diff options
author | James Pharaoh <james@phsys.co.uk> | 2013-09-02 20:37:53 +0200 |
---|---|---|
committer | James Pharaoh <james@phsys.co.uk> | 2013-09-02 20:40:32 +0200 |
commit | dc5ffb688cb89c19c0a80e3fcf14749f222583a4 (patch) | |
tree | 273582efeb4074d1d0956dbee0a9d5a7a51b9003 /library | |
parent | 6dd3505c9e3a3d4e56b6eee682900ca3f590eddb (diff) | |
download | ansible-dc5ffb688cb89c19c0a80e3fcf14749f222583a4.tar.gz |
fix for rds region variable
Diffstat (limited to 'library')
-rw-r--r-- | library/cloud/rds | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cloud/rds b/library/cloud/rds index 99b0fb5446..77746026d3 100644 --- a/library/cloud/rds +++ b/library/cloud/rds @@ -349,12 +349,12 @@ def main(): elif 'EC2_ACCESS_KEY' in os.environ: aws_access_key = os.environ['EC2_ACCESS_KEY'] - if not aws_region: + if not region: module.fail_json(msg = str("region not specified and unable to determine region from EC2_REGION.")) # connect to the rds endpoint try: - conn = boto.rds.connect_to_region(aws_region, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key) + conn = boto.rds.connect_to_region(region, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key) except boto.exception.BotoServerError, e: module.fail_json(msg = e.error_message) |