mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[aws] ec2_vol_facts: only access volume tags when set (#46801)
This commit is contained in:
parent
b923bf708d
commit
e744c83808
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ def get_volume_info(volume, region):
|
||||||
'status': attachment[0]["state"] if len(attachment) > 0 else None,
|
'status': attachment[0]["state"] if len(attachment) > 0 else None,
|
||||||
'delete_on_termination': attachment[0]["delete_on_termination"] if len(attachment) > 0 else None
|
'delete_on_termination': attachment[0]["delete_on_termination"] if len(attachment) > 0 else None
|
||||||
},
|
},
|
||||||
'tags': boto3_tag_list_to_ansible_dict(volume['tags'])
|
'tags': boto3_tag_list_to_ansible_dict(volume['tags']) if "tags" in volume else None
|
||||||
}
|
}
|
||||||
|
|
||||||
return volume_info
|
return volume_info
|
||||||
|
|
Loading…
Reference in a new issue