mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-30 04:00:21 -07:00
Feature/aws helper function for tags (#23387)
* Add new helper function for comparing AWS tag key pair dicts. Also modify boto3_tag_list_to_ansible_dict function to be more generic when looking for key names because AWS sometimes uses 'Key', sometimes 'TagKey' and who knows what the future holds! Fixed modules to work with changes. * Review changes * Add some more doc to GUIDELINES for tags and fix var name for snaked values in ec2_group_facts
This commit is contained in:
parent
b2a2f69a6e
commit
fd1debb869
6 changed files with 76 additions and 26 deletions
|
@ -210,7 +210,7 @@ def list_ec2_snapshots(connection, module):
|
|||
# Turn the boto3 result in to ansible friendly tag dictionary
|
||||
for snapshot in snaked_snapshots:
|
||||
if 'tags' in snapshot:
|
||||
snapshot['tags'] = boto3_tag_list_to_ansible_dict(snapshot['tags'])
|
||||
snapshot['tags'] = boto3_tag_list_to_ansible_dict(snapshot['tags'], 'key', 'value')
|
||||
|
||||
module.exit_json(snapshots=snaked_snapshots)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue