From 61554143d04d5f1a43e37a079aad72abc1fb2b22 Mon Sep 17 00:00:00 2001 From: Prasad Katti Date: Thu, 26 Oct 2017 04:31:57 -0700 Subject: [PATCH] Document return values of ec2_eip (#32018) - added RETURN value for ec2_eip - removed note about what is returned - removed a duplicate example --- lib/ansible/modules/cloud/amazon/ec2_eip.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_eip.py b/lib/ansible/modules/cloud/amazon/ec2_eip.py index 6759a67ec2..03e09bf315 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_eip.py +++ b/lib/ansible/modules/cloud/amazon/ec2_eip.py @@ -76,8 +76,6 @@ extends_documentation_fragment: - ec2 author: "Rick Mendes (@rickmendes) " notes: - - This module will return C(public_ip) on success, which will contain the - public IP address associated with the device. - There may be a delay between the time the EIP is assigned and when the cloud instance is reachable via the new address. Use wait_for and pause to delay further playbook execution until the instance is reachable, @@ -131,10 +129,6 @@ EXAMPLES = ''' debug: msg: "Allocated IP is {{ eip.public_ip }}" -- name: another way of allocating an elastic IP without associating it to anything - ec2_eip: - state: 'present' - - name: provision new instances with ec2 ec2: keypair: mykey @@ -161,6 +155,19 @@ EXAMPLES = ''' msg: "Allocated IP inside a VPC is {{ eip.public_ip }}" ''' +RETURN = ''' +allocation_id: + description: allocation_id of the elastic ip + returned: on success + type: string + sample: eipalloc-51aa3a6c +public_ip: + description: an elastic ip address + returned: on success + type: string + sample: 52.88.159.209 +''' + try: import boto.exception except ImportError: