mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add ec2 instance tags and groups info
This commit is contained in:
parent
646657e325
commit
103caa2853
1 changed files with 3 additions and 1 deletions
|
@ -591,7 +591,9 @@ def get_instance_info(inst):
|
||||||
'root_device_type': inst.root_device_type,
|
'root_device_type': inst.root_device_type,
|
||||||
'root_device_name': inst.root_device_name,
|
'root_device_name': inst.root_device_name,
|
||||||
'state': inst.state,
|
'state': inst.state,
|
||||||
'hypervisor': inst.hypervisor}
|
'hypervisor': inst.hypervisor,
|
||||||
|
'tags': inst.tags,
|
||||||
|
'groups': {group.id: group.name for group in inst.groups}}
|
||||||
try:
|
try:
|
||||||
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
|
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Reference in a new issue