From 0b380b09bfceb2e8ecbdfca311a65f7334658383 Mon Sep 17 00:00:00 2001 From: Selivanov Pavel Date: Wed, 28 Nov 2018 22:42:38 +0300 Subject: [PATCH] ec2_instance_facts.py: documentation: add example (#49010) Add an example of using multiple states for instance-state-name in filters. Not obvious how it works until you try. --- lib/ansible/modules/cloud/amazon/ec2_instance_facts.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/ec2_instance_facts.py b/lib/ansible/modules/cloud/amazon/ec2_instance_facts.py index 76265f5688b..864de8d7b5b 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_instance_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_instance_facts.py @@ -60,6 +60,12 @@ EXAMPLES = ''' - ec2_instance_facts: filters: "tag:Name": Example + +# Gather facts about any instance in states "shutting-down", "stopping", "stopped" +- ec2_instance_facts: + filters: + instance-state-name: [ "shutting-down", "stopping", "stopped" ] + ''' RETURN = '''