Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document return values of ec2_eip #32018

Merged
merged 1 commit into from
Oct 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 13 additions & 6 deletions lib/ansible/modules/cloud/amazon/ec2_eip.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
- ec2
author: "Rick Mendes (@rickmendes) <rmendes@illumina.com>"
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,
Expand Down Expand Up @@ -131,10 +129,6 @@
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
Expand All @@ -161,6 +155,19 @@
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:
Expand Down