From ac5b0ca59bada019991c5fb6511a7241655d7aa4 Mon Sep 17 00:00:00 2001 From: Andrey Trubachev Date: Sat, 3 Jan 2015 10:41:53 +0300 Subject: [PATCH] Fix mess of ipv6 and ipv4 addresses in private_ip --- lib/ansible/modules/cloud/openstack/nova_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/openstack/nova_compute.py b/lib/ansible/modules/cloud/openstack/nova_compute.py index e4e1cae6c8..77e759af14 100644 --- a/lib/ansible/modules/cloud/openstack/nova_compute.py +++ b/lib/ansible/modules/cloud/openstack/nova_compute.py @@ -518,7 +518,7 @@ def _get_server_state(module, nova): (ip_changed, server) = _check_floating_ips(module, nova, server) private = openstack_find_nova_addresses(getattr(server, 'addresses'), 'fixed', 'private') 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': return True if module.params['state'] == 'absent':