diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-01-17 07:09:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 07:09:19 -0800 |
commit | a1f7d5067f9e6c5c6de0a933eede664e1afb1fdb (patch) | |
tree | bcbb6a3598e486647a492de2d4ab39c64eaf7388 /playbooks | |
parent | d5241bd08465db72d5a4c4c36d7c4a14f151d688 (diff) | |
parent | 54502cee66db02a659e58aab64fb97ca6f728ca0 (diff) | |
download | openshift-a1f7d5067f9e6c5c6de0a933eede664e1afb1fdb.tar.gz openshift-a1f7d5067f9e6c5c6de0a933eede664e1afb1fdb.tar.bz2 openshift-a1f7d5067f9e6c5c6de0a933eede664e1afb1fdb.tar.xz openshift-a1f7d5067f9e6c5c6de0a933eede664e1afb1fdb.zip |
Merge pull request #6714 from tomassedovic/move-openstack-inventory
Automatic merge from submit-queue.
Move OpenStack inventory.py out of sample-inventory
This moves the dynamic inventory for OpenStack from the `sample-inventory` dir users are expected to copy and edit to `/inventory/openstack`.
This will ensure that people don't use an outdated inventory as well as communicates that the inventory (similar to the playbooks and roles) is not something they are expected to modify under normal circumstances.
The sample inventory will now contain only `group_vars` and as such, moving from that to providing vars explicitly is also more obvious (you replace the `-i inventory` command with `-e @vars.yaml` and you're good to go).
Diffstat (limited to 'playbooks')
-rw-r--r-- | playbooks/openstack/README.md | 10 | ||||
-rwxr-xr-x | playbooks/openstack/inventory.py (renamed from playbooks/openstack/sample-inventory/inventory.py) | 0 |
2 files changed, 9 insertions, 1 deletions
diff --git a/playbooks/openstack/README.md b/playbooks/openstack/README.md index 2e5cacc76..fb621f898 100644 --- a/playbooks/openstack/README.md +++ b/playbooks/openstack/README.md @@ -183,7 +183,9 @@ Then run the provision + install playbook -- this will create the OpenStack resources: ```bash -$ ansible-playbook --user openshift -i inventory \ +$ ansible-playbook --user openshift \ + -i openshift-ansible/playbooks/openstack/inventory.py + -i inventory \ openshift-ansible/playbooks/openstack/openshift-cluster/provision_install.yml \ -e openshift_repos_enable_testing=true ``` @@ -191,6 +193,11 @@ $ ansible-playbook --user openshift -i inventory \ Note, you may want to use the testing repo for development purposes only. Normally, `openshift_repos_enable_testing` should not be specified. +In addition to *your* inventory with your OpenShift and OpenStack +configuration, we are also supplying the [dynamic inventory][dynamic] from +`openshift-ansible/inventory`. It's a script that will look at the Nova servers +and other resources that will be created and let Ansible know about them. + If you're using multiple inventories, make sure you pass the path to the right one to `-i`. @@ -233,3 +240,4 @@ advanced configuration: [loadbalancer]: ./advanced-configuration.md#multi-master-configuration [external-dns]: ./advanced-configuration.md#dns-configuration-variables [cinder-registry]: ./advanced-configuration.md#creating-and-using-a-cinder-volume-for-the-openshift-registry +[dynamic]: http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html diff --git a/playbooks/openstack/sample-inventory/inventory.py b/playbooks/openstack/inventory.py index 76e658eb7..76e658eb7 100755 --- a/playbooks/openstack/sample-inventory/inventory.py +++ b/playbooks/openstack/inventory.py |