Use ipv4 in server launch inventory output

Follow-on to switch to ipv4 by default with
Ifea55a923453c4c2af20151512fa95549342d1f5.

Change-Id: I3b028b0ba3e8482421e8fd4c77e0a0d0f6b0be27
This commit is contained in:
Ian Wienand 2020-05-22 09:49:47 +10:00
parent df17ea2c59
commit 9f9ef66451

View File

@ -105,7 +105,7 @@ def print_inventory_yaml(server, ip4, ip6):
print("Put the following into inventory/openstack.yaml") print("Put the following into inventory/openstack.yaml")
print("\n") print("\n")
print(" {name}:".format(name=server.name)) print(" {name}:".format(name=server.name))
print(" ansible_host: {ip}".format(ip=ip6 or ip4)) print(" ansible_host: {ip}".format(ip=ip4 or ip6))
print(" location:") print(" location:")
print(" cloud: {cloud}".format(cloud=server.location['cloud'])) print(" cloud: {cloud}".format(cloud=server.location['cloud']))
print(" region_name: {region_name}".format( print(" region_name: {region_name}".format(