Skip to content

Commit 417bb8a

Browse files
committed
Refactor host configuration playbooks into one
The list of host configuration playbooks was slowly growing. This change introduces one master playbook which imports the others, reducing complexity.
1 parent ce5b025 commit 417bb8a

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

README.rst

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,24 @@ Review the vars defined within `ansible/vars/defaults.yml`. In here you can cust
197197
However, make sure to define `ssh_key_path` to point to the location of the SSH key in use amongst the nodes and also `vxlan_vni` which should be unique value between 1 to 100,000.
198198
VNI should be much smaller than the officially supported limit of 16,777,215 as we encounter errors when attempting to bring interfaces up that use a high VNI. You must set``vault_password_path``; this should be set to the path to a file containing the Ansible vault password.
199199

200-
Finally run the ansible playbooks.
201-
You may need to run `fix-homedir-ownership.yml` if you are using an image that has `ansible_user` not owning their own home folder.
202-
You may also need to run `grow-control-host.yml` if you are using LVM images and the LVMs are too small to install Ansible.
203-
If not you can skip those playbook and proceed onto `deploy-openstack-config` which shall configure your Ansible control host in preparation for deployment.
200+
Finally, run the configure-hosts playbook.
204201

205202
.. code-block:: console
206203
207-
ansible-playbook -i ansible/inventory.yml ansible/fix-homedir-ownership.yml
208-
ansible-playbook -i ansible/inventory.yml ansible/add-fqdn.yml
209-
ansible-playbook -i ansible/inventory.yml ansible/grow-control-host.yml
210-
ansible-playbook -i ansible/inventory.yml ansible/deploy-openstack-config.yml
204+
ansible-playbook -i ansible/inventory.yml ansible/configure-hosts.yml
205+
206+
This playbook sequentially executes 4 other playbooks:
207+
208+
#. ``fix-homedir-ownership.yml`` - Ensures the ``ansible_user`` owns their home directory. Tag: ``fix-homedir``
209+
#. ``add-fqdn.yml`` - Ensures FQDNs are added to ``/etc/hosts``. Tag: ``fqdn``
210+
#. ``grow-control-host.yml`` - Applies LVM configuration to the control host to ensure it has enough space to continue with the rest of the deployment. Tag: ``lvm``
211+
#. ``deploy-openstack-config.yml`` - Deploys the OpenStack configuration to the control host. Tag: ``deploy``
212+
213+
These playbooks are tagged so that they can be invoked or skipped as required. For example, if designate is not being deployed, some time can be saved by skipping the FQDN playbook:
214+
215+
.. code-block:: console
216+
217+
ansible-playbook -i ansible/inventory.yml ansible/configure-hosts.yml --skip-tags fqdn
211218
212219
Deploy OpenStack
213220
----------------

ansible/configure-hosts.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
- import_playbook: fix-homedir-ownership.yml
3+
tags: fix-homedir
4+
- import_playbook: add-fqdn.yml
5+
tags: fqdn
6+
- import_playbook: grow-control-host.yml
7+
tags: lvm
8+
- import_playbook: deploy-openstack-config.yml
9+
tags: deploy

0 commit comments

Comments
 (0)