From f3abfa0f19b427008e2629805a869df8ef61afbd Mon Sep 17 00:00:00 2001 From: Philip Misiowiec Date: Tue, 30 Dec 2014 23:37:38 -0800 Subject: [PATCH] Adds tenancy state to returning json --- lib/ansible/modules/cloud/amazon/ec2.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py index c75c29125c1..84fa572adab 100644 --- a/lib/ansible/modules/cloud/amazon/ec2.py +++ b/lib/ansible/modules/cloud/amazon/ec2.py @@ -601,6 +601,11 @@ def get_instance_info(inst): except AttributeError: instance_info['ebs_optimized'] = False + try: + instance_info['tenancy'] = getattr(inst, 'placement_tenancy') + except AttributeError: + instance_info['tenancy'] = 'default' + return instance_info def boto_supports_associate_public_ip_address(ec2):