From 103caa28537a1340f68a7450981ba26517fe61d0 Mon Sep 17 00:00:00 2001 From: Capi Etheriel Date: Wed, 4 Feb 2015 18:20:11 -0200 Subject: [PATCH] add ec2 instance tags and groups info --- lib/ansible/modules/cloud/amazon/ec2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py index 47f75cf187..a48eb534b4 100755 --- a/lib/ansible/modules/cloud/amazon/ec2.py +++ b/lib/ansible/modules/cloud/amazon/ec2.py @@ -591,7 +591,9 @@ def get_instance_info(inst): 'root_device_type': inst.root_device_type, 'root_device_name': inst.root_device_name, 'state': inst.state, - 'hypervisor': inst.hypervisor} + 'hypervisor': inst.hypervisor, + 'tags': inst.tags, + 'groups': {group.id: group.name for group in inst.groups}} try: instance_info['virtualization_type'] = getattr(inst,'virtualization_type') except AttributeError: