From 7d16ec283e7ced7cefc9071d9350147fd3b90d3e Mon Sep 17 00:00:00 2001 From: Hagai Kariti Date: Wed, 11 Mar 2015 17:30:20 +0200 Subject: [PATCH] Fix KeyError in public zones in route53 --- lib/ansible/modules/cloud/amazon/route53.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/route53.py b/lib/ansible/modules/cloud/amazon/route53.py index 6468729346..701414af12 100644 --- a/lib/ansible/modules/cloud/amazon/route53.py +++ b/lib/ansible/modules/cloud/amazon/route53.py @@ -260,7 +260,7 @@ def main(): for r53zone in results['ListHostedZonesResponse']['HostedZones']: # only save this zone id if the private status of the zone matches # the private_zone_in boolean specified in the params - if module.boolean(r53zone['Config']['PrivateZone']) == private_zone_in: + if module.boolean(r53zone['Config'].get('PrivateZone', False)) == private_zone_in: zone_id = r53zone['Id'].replace('/hostedzone/', '') zones[r53zone['Name']] = zone_id