summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJonathan McCall <jonnymcc@gmail.com>2017-02-16 08:49:47 -0500
committerRyan Brown <sb@ryansb.com>2017-02-16 08:49:47 -0500
commit047ed2728cb428f03cc35399aa0e1d75b8f857ce (patch)
treee30118e68b16e65f7a35f610c6a80a45c4417f4c /contrib
parent34e6cc788f12ea39992de9f1f796700d4138798e (diff)
downloadansible-047ed2728cb428f03cc35399aa0e1d75b8f857ce.tar.gz
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
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/inventory/ec2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py
index 9ee967b437..9b9db4bafc 100755
--- a/contrib/inventory/ec2.py
+++ b/contrib/inventory/ec2.py
@@ -1293,7 +1293,10 @@ class Ec2Inventory(object):
''' Get and store the map of resource records to domain names that
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()
route53_zones = [ zone for zone in all_zones if zone.name[:-1]