1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix mess of ipv6 and ipv4 addresses in private_ip

This commit is contained in:
Andrey Trubachev 2015-01-03 10:41:53 +03:00 committed by Matt Clay
parent 68a07a2bb5
commit ac5b0ca59b

View file

@ -518,7 +518,7 @@ def _get_server_state(module, nova):
(ip_changed, server) = _check_floating_ips(module, nova, server) (ip_changed, server) = _check_floating_ips(module, nova, server)
private = openstack_find_nova_addresses(getattr(server, 'addresses'), 'fixed', 'private') private = openstack_find_nova_addresses(getattr(server, 'addresses'), 'fixed', 'private')
public = openstack_find_nova_addresses(getattr(server, 'addresses'), 'floating', 'public') public = openstack_find_nova_addresses(getattr(server, 'addresses'), 'floating', 'public')
module.exit_json(changed = ip_changed, id = server.id, public_ip = ''.join(public), private_ip = ''.join(private), info = server._info) module.exit_json(changed = ip_changed, id = server.id, public_ip = public, private_ip = private, info = server._info)
if server and module.params['state'] == 'absent': if server and module.params['state'] == 'absent':
return True return True
if module.params['state'] == 'absent': if module.params['state'] == 'absent':