From c5c0d9086e65585c92bb3985cd5f9f73fae4a2bc Mon Sep 17 00:00:00 2001 From: Marc Mercer Date: Tue, 14 Mar 2017 08:12:28 -0700 Subject: [PATCH] [cloud][docs] update ec2_tag documentation example (#22586) Currently the documentation utilizes with_subelements, but it does not parse the results correctly. By changing to with_items: and specifying the proper list, we are able to tag the instances as expected. --- lib/ansible/modules/cloud/amazon/ec2_tag.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_tag.py b/lib/ansible/modules/cloud/amazon/ec2_tag.py index 64252ea277f..82e8ec3be21 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_tag.py +++ b/lib/ansible/modules/cloud/amazon/ec2_tag.py @@ -100,9 +100,8 @@ EXAMPLES = ''' tags: Name: dbserver Env: production - with_subelements: - - ec2_vol.results - - volumes + with_items: + - ec2_vol.volumes - name: Get EC2 facts action: ec2_facts