diff --git a/docs/usage.rst b/docs/usage.rst index 08bac3b66f222abeef0fcdf1d2fc0a6ef65143a7..965397024ef95fda8e058f507978241ae953fb40 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -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. diff --git a/testsite/group_vars/preseed.yml b/testsite/group_vars/preseed.yml index ed97d539c095cf1413af30cc23dea272095b97dd..2241392be98a827c2eb361a8c3038da48ee5395c 100644 --- a/testsite/group_vars/preseed.yml +++ b/testsite/group_vars/preseed.yml @@ -1 +1,3 @@ --- + +preseed_directory: "{{ inventory_dir }}/preseed_files/"