From ad248376b13ffa24addaf34468bf33125d1d88fe Mon Sep 17 00:00:00 2001 From: Tom Wadley Date: Tue, 4 Nov 2014 14:50:12 +0000 Subject: [PATCH] use aws connect call in rds_subnet_group that allows boto profile use --- lib/ansible/modules/cloud/amazon/rds_subnet_group.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/rds_subnet_group.py b/lib/ansible/modules/cloud/amazon/rds_subnet_group.py index 9731154f77c..40170ba5f4b 100644 --- a/lib/ansible/modules/cloud/amazon/rds_subnet_group.py +++ b/lib/ansible/modules/cloud/amazon/rds_subnet_group.py @@ -121,13 +121,13 @@ def main(): module.fail_json(msg = str("Parameter %s not allowed for state='absent'" % not_allowed)) # Retrieve any AWS settings from the environment. - ec2_url, aws_access_key, aws_secret_key, region = get_ec2_creds(module) + region, ec2_url, aws_connect_params = get_aws_connection_info(module) if not region: module.fail_json(msg = str("region not specified and unable to determine region from EC2_REGION.")) try: - conn = boto.rds.connect_to_region(region, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key) + conn = boto.rds.connect_to_region(region, **aws_connect_params) except boto.exception.BotoServerError, e: module.fail_json(msg = e.error_message)