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

Added a helpful example to the ec2_facts doc. #2921

Merged
merged 1 commit into from
May 18, 2013
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 library/cloud/ec2_facts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.

DOCUMENTATION="""
DOCUMENTATION = '''
---
module: ec2_facts
short_description: Gathers facts about remote hosts within ec2 (aws)
Expand All @@ -28,12 +28,19 @@ description:
work this cloud provider as well.
notes:
- Parameters to filter on ec2_facts may be added later.
examples:
- code: ansible all -m ec2_facts
description: Obtain facts from ec2 metatdata servers. You will need to run an instance within ec2.
author: "Silviu Dicu <silviudicu@gmail.com>"
"""

'''

EXAMPLES = '''
# Conditional example
- name: Gather facts
action: ec2_facts

- name: Conditional
action: debug msg="This instance is a t1.micro"
when: ansible_ec2_instance_type == "t1.micro"
'''

import urllib2
import socket
import re
Expand Down