diff options
author | Tomas Sedovic <tomas@sedovic.cz> | 2017-10-05 12:36:03 +0200 |
---|---|---|
committer | Tomas Sedovic <tomas@sedovic.cz> | 2017-10-05 12:36:03 +0200 |
commit | 3fb3db798d7f3d890f063315c8174e7252b9c054 (patch) | |
tree | 957e2cfc059a3b5e92045f3dbd7eea1ac8e685ea /playbooks/provisioning/openstack/sample-inventory/inventory.py | |
parent | 181b8f6c82fe7f135b563edb74a39a44d279e32e (diff) | |
download | openshift-3fb3db798d7f3d890f063315c8174e7252b9c054.tar.gz openshift-3fb3db798d7f3d890f063315c8174e7252b9c054.tar.bz2 openshift-3fb3db798d7f3d890f063315c8174e7252b9c054.tar.xz openshift-3fb3db798d7f3d890f063315c8174e7252b9c054.zip |
Set public_v4 to private_v4 if it doesn't exist
The DNS code expects a `public_v4` even when we use the provider
networks. Let's just always export it.
Diffstat (limited to 'playbooks/provisioning/openstack/sample-inventory/inventory.py')
-rwxr-xr-x | playbooks/provisioning/openstack/sample-inventory/inventory.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/playbooks/provisioning/openstack/sample-inventory/inventory.py b/playbooks/provisioning/openstack/sample-inventory/inventory.py index 4949deac2..6a1b74b3d 100755 --- a/playbooks/provisioning/openstack/sample-inventory/inventory.py +++ b/playbooks/provisioning/openstack/sample-inventory/inventory.py @@ -72,8 +72,9 @@ if __name__ == '__main__': 'ansible_host': ssh_ip_address } - if server.public_v4: - vars['public_v4'] = server.public_v4 + public_v4 = server.public_v4 or server.private_v4 + if public_v4: + vars['public_v4'] = public_v4 # TODO(shadower): what about multiple networks? if server.private_v4: vars['private_v4'] = server.private_v4 |