diff options
author | Shayne Clausson <shayne.clausson@stelligent.com> | 2015-10-09 10:25:38 +0200 |
---|---|---|
committer | Shayne Clausson <shayne.clausson@stelligent.com> | 2015-10-09 10:27:36 +0200 |
commit | 55b3f9e4e5a17cd303688684ba7284f1e57e8741 (patch) | |
tree | e4c4c08ac629fc8ea87d64726bbe71137e4fc7b7 /lib | |
parent | 59d655c54314cd3e84d1381359c84d59f76d62a4 (diff) | |
download | ansible-55b3f9e4e5a17cd303688684ba7284f1e57e8741.tar.gz |
Use AWS_DEFAULT_REGION env var if none specified
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/module_utils/ec2.py | 2 |
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: |