Forráskód Böngészése

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.
Tomas Sedovic 7 éve
szülő
commit
3fb3db798d

+ 3 - 2
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