1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix KeyError in public zones in route53

This commit is contained in:
Hagai Kariti 2015-03-11 17:30:20 +02:00 committed by Matt Clay
parent a02641b4f3
commit 7d16ec283e

View file

@ -260,7 +260,7 @@ def main():
for r53zone in results['ListHostedZonesResponse']['HostedZones']: for r53zone in results['ListHostedZonesResponse']['HostedZones']:
# only save this zone id if the private status of the zone matches # only save this zone id if the private status of the zone matches
# the private_zone_in boolean specified in the params # 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/', '') zone_id = r53zone['Id'].replace('/hostedzone/', '')
zones[r53zone['Name']] = zone_id zones[r53zone['Name']] = zone_id