From 2b0fc33fd52fc55737d3d998f730c104a852c958 Mon Sep 17 00:00:00 2001 From: Rob Date: Mon, 21 Sep 2015 11:13:56 +1000 Subject: [PATCH] Tolerate missing classic_link_enabled attribute --- .../modules/extras/cloud/amazon/ec2_vpc_net_facts.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_net_facts.py b/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_net_facts.py index fa45c2635d3..538d39f3b41 100644 --- a/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_net_facts.py +++ b/lib/ansible/modules/extras/cloud/amazon/ec2_vpc_net_facts.py @@ -64,9 +64,14 @@ except ImportError: def get_vpc_info(vpc): + try: + classic_link = vpc.classic_link_enabled + except AttributeError: + classic_link = False + vpc_info = { 'id': vpc.id, 'instance_tenancy': vpc.instance_tenancy, - 'classic_link_enabled': vpc.classic_link_enabled, + 'classic_link_enabled': classic_link, 'dhcp_options_id': vpc.dhcp_options_id, 'state': vpc.state, 'is_default': vpc.is_default,