From 3fb3db798d7f3d890f063315c8174e7252b9c054 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 5 Oct 2017 12:36:03 +0200 Subject: 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. --- playbooks/provisioning/openstack/sample-inventory/inventory.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'playbooks/provisioning') 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 -- cgit v1.2.3