Changeset - 35b9bf9477e1
[Not reviewed]
0 2 0
Branko Majic (branko) - 4 years ago 2020-10-01 22:19:11
branko@majic.rs
MAR-155: Updated usage instructions and test site configuration to cover the now mandatory preseed_directory parameter.
2 files changed with 20 insertions and 5 deletions:
0 comments (0 inline, 0 general)
docs/usage.rst
Show inline comments
 
@@ -335,17 +335,28 @@ So, let's set this up for start:
 
        roles:
 
          - preseed
 

	
 
2. And that's about it... Now we can generate the pressed files::
 
2. Configure the role by creating the configuration file:
 

	
 
   :file:`~/mysite/group_vars/preseed.yml`
 

	
 
   ::
 

	
 
      ---
 

	
 
      # Directory where the preseed files will be output to.
 
      preseed_directory: "~/mysite/preseed_files/"
 

	
 
3. Now we can generate the pressed files::
 

	
 
     workon mysite && ansible-playbook playbooks/preseed.yml
 

	
 
3. If all went well, you should have the following files created:
 
4. If all went well, you should have the following files created:
 

	
 
   * :file:`~/mysite/preseed_files/comms.example.com.cfg`
 
   * :file:`~/mysite/preseed_files/www.example.com.cfg`
 
   * :file:`~/mysite/preseed_files/bak.example.com.cfg`
 

	
 
4. You can have a look at them, but you might notice the settings in the file
 
5. You can have a look at them, but you might notice the settings in the file
 
   might not be to your liking. In particular, it could be using wrong timezone,
 
   defaulting to DHCP for network configuration etc. Let's concentrate on making
 
   the network configuration changes - this is the main thing that will probably
 
@@ -357,6 +368,8 @@ So, let's set this up for start:
 

	
 
      ---
 

	
 
      # Directory where the preseed files will be output to.
 
      preseed_directory: "~/mysite/preseed_files/"
 
      # Set your default (initial) root password.
 
      preseed_root_password: changeit
 
      # Use manual network configuration (no DHCP).
 
@@ -381,11 +394,11 @@ So, let's set this up for start:
 
          hostname: bak
 
          ip: 10.32.64.23
 

	
 
5. Now re-run the preseed playbook::
 
6. Now re-run the preseed playbook::
 

	
 
     workon mysite && ansible-playbook playbooks/preseed.yml
 

	
 
6. The preseed files should have been updated now, and you should have the new
 
7. The preseed files should have been updated now, and you should have the new
 
   customised configuration files in the ``preseed_files`` directory. You can
 
   now use these to install the servers.
 

	
testsite/group_vars/preseed.yml
Show inline comments
 
---
 

	
 
preseed_directory: "{{ inventory_dir }}/preseed_files/"
0 comments (0 inline, 0 general)