summaryrefslogtreecommitdiffstats
path: root/playbooks/provisioning
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-10-05 12:36:03 +0200
committerTomas Sedovic <tomas@sedovic.cz>2017-10-05 12:36:03 +0200
commit3fb3db798d7f3d890f063315c8174e7252b9c054 (patch)
tree957e2cfc059a3b5e92045f3dbd7eea1ac8e685ea /playbooks/provisioning
parent181b8f6c82fe7f135b563edb74a39a44d279e32e (diff)
downloadopenshift-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')
-rwxr-xr-xplaybooks/provisioning/openstack/sample-inventory/inventory.py5
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