summaryrefslogtreecommitdiff
path: root/lib/ansible
diff options
context:
space:
mode:
authorShayne Clausson <shayne.clausson@stelligent.com>2015-10-09 10:25:38 +0200
committerShayne Clausson <shayne.clausson@stelligent.com>2015-10-09 10:27:36 +0200
commit55b3f9e4e5a17cd303688684ba7284f1e57e8741 (patch)
treee4c4c08ac629fc8ea87d64726bbe71137e4fc7b7 /lib/ansible
parent59d655c54314cd3e84d1381359c84d59f76d62a4 (diff)
downloadansible-55b3f9e4e5a17cd303688684ba7284f1e57e8741.tar.gz
Use AWS_DEFAULT_REGION env var if none specified
Diffstat (limited to 'lib/ansible')
-rw-r--r--lib/ansible/module_utils/ec2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/ec2.py b/lib/ansible/module_utils/ec2.py
index 14a8676b59..ac799772c2 100644
--- a/lib/ansible/module_utils/ec2.py
+++ b/lib/ansible/module_utils/ec2.py
@@ -124,6 +124,8 @@ def get_aws_connection_info(module, boto3=False):
if not region:
if 'AWS_REGION' in os.environ:
region = os.environ['AWS_REGION']
+ elif 'AWS_DEFAULT_REGION' in os.environ:
+ region = os.environ['AWS_DEFAULT_REGION']
elif 'EC2_REGION' in os.environ:
region = os.environ['EC2_REGION']
else: