return allocation id for vpc address.
This commit is contained in:
parent
b20066ff8e
commit
d0e37fa542
1 changed files with 2 additions and 2 deletions
|
@ -286,7 +286,7 @@ def ensure_present(ec2, domain, address, device_id,
|
||||||
|
|
||||||
changed = changed or assoc_result['changed']
|
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):
|
def ensure_absent(ec2, domain, address, device_id, check_mode, isinstance=True):
|
||||||
|
@ -362,7 +362,7 @@ def main():
|
||||||
module.check_mode, isinstance=is_instance)
|
module.check_mode, isinstance=is_instance)
|
||||||
else:
|
else:
|
||||||
address = allocate_address(ec2, domain, reuse_existing_ip_allowed)
|
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:
|
else:
|
||||||
if device_id:
|
if device_id:
|
||||||
disassociated = ensure_absent(ec2, domain, address, device_id, module.check_mode, isinstance=is_instance)
|
disassociated = ensure_absent(ec2, domain, address, device_id, module.check_mode, isinstance=is_instance)
|
||||||
|
|
Loading…
Reference in a new issue