From 8b62f25c5ceb36fb900923c7c55708101288c3db Mon Sep 17 00:00:00 2001 From: lwade Date: Wed, 15 May 2013 16:32:35 +0100 Subject: [PATCH] Added a helpful example to the ec2_facts doc. --- library/cloud/ec2_facts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/library/cloud/ec2_facts b/library/cloud/ec2_facts index 1c7944c2a93..411be0268e4 100644 --- a/library/cloud/ec2_facts +++ b/library/cloud/ec2_facts @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -DOCUMENTATION=""" +DOCUMENTATION = ''' --- module: ec2_facts short_description: Gathers facts about remote hosts within ec2 (aws) @@ -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 " -""" +''' +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