Skip to content

Commit

Permalink
ec2_vpc_subnet_info - example fix (#1357) (#1377)
Browse files Browse the repository at this point in the history
[PR #1357/e6e58bff backport][stable-5] ec2_vpc_subnet_info - example fix

This is a backport of PR #1357 as merged into main (e6e58bf).
SUMMARY
example is wrong. result returns in a list under key results
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
ec2_vpc_subnet_info

Reviewed-by: Mark Chappell
  • Loading branch information
patchback[bot] authored Feb 20, 2023
1 parent 3a4cf08 commit 147c054
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/1357-subnet-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- ec2_vpc_subnet_info - fix example (https://github.com/ansible-collections/amazon.aws/pull/1357).
2 changes: 1 addition & 1 deletion plugins/modules/ec2_vpc_subnet_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
register: subnet_info
- set_fact:
subnet_ids: "{{ subnet_info.subnets|map(attribute='id')|list }}"
subnet_ids: "{{ subnet_info.results | sum(attribute='subnets', start=[]) | map(attribute='subnet_id') }}"
'''

RETURN = '''
Expand Down

0 comments on commit 147c054

Please sign in to comment.