Pass boto_profile to get_route53_records (#14354)

* Pass boto_profile to get_route53_records

* Add conditional around r53_conn to check for boto_profile
This commit is contained in:
Jonathan McCall 2017-02-16 08:49:47 -05:00 committed by Ryan Brown
commit 047ed2728c

View file

@ -1293,7 +1293,10 @@ class Ec2Inventory(object):
''' Get and store the map of resource records to domain names that ''' Get and store the map of resource records to domain names that
point to them. ''' point to them. '''
r53_conn = route53.Route53Connection() if self.boto_profile:
r53_conn = route53.Route53Connection(profile_name=self.boto_profile)
else:
r53_conn = route53.Route53Connection()
all_zones = r53_conn.get_zones() all_zones = r53_conn.get_zones()
route53_zones = [ zone for zone in all_zones if zone.name[:-1] route53_zones = [ zone for zone in all_zones if zone.name[:-1]