From d0e37fa54222f31aefbf4282a088dfddb704bfc2 Mon Sep 17 00:00:00 2001 From: Jon Hadfield Date: Sat, 2 Jan 2016 11:16:46 +0000 Subject: [PATCH] return allocation id for vpc address. --- lib/ansible/modules/cloud/amazon/ec2_eip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_eip.py b/lib/ansible/modules/cloud/amazon/ec2_eip.py index f944a364bbd..689deeb2ef7 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_eip.py +++ b/lib/ansible/modules/cloud/amazon/ec2_eip.py @@ -286,7 +286,7 @@ def ensure_present(ec2, domain, address, device_id, changed = changed or assoc_result['changed'] - return {'changed': changed, 'public_ip': address.public_ip} + return {'changed': changed, 'public_ip': address.public_ip, 'allocation_id': address.allocation_id} def ensure_absent(ec2, domain, address, device_id, check_mode, isinstance=True): @@ -362,7 +362,7 @@ def main(): module.check_mode, isinstance=is_instance) else: address = allocate_address(ec2, domain, reuse_existing_ip_allowed) - result = {'changed': True, 'public_ip': address.public_ip} + result = {'changed': True, 'public_ip': address.public_ip, 'allocation_id': address.allocation_id} else: if device_id: disassociated = ensure_absent(ec2, domain, address, device_id, module.check_mode, isinstance=is_instance)