Fix KeyError in public zones in route53

reviewable/pr18780/r1
Hagai Kariti 10 years ago
parent 47c6dae9f3
commit d65f9aa3af

@ -261,7 +261,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

Loading…
Cancel
Save