Skip to content

Commit

Permalink
ec2_vpc_subnet_info - example fix (#1357)
Browse files Browse the repository at this point in the history
ec2_vpc_subnet_info - example fix

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
markuman authored Feb 20, 2023
1 parent 6948eb5 commit e6e58bf
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 @@ -65,7 +65,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 e6e58bf

Please sign in to comment.