mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #12690 from stelligent/devel
Use AWS_DEFAULT_REGION env var if none specified
This commit is contained in:
commit
f415d39dfd
1 changed files with 2 additions and 0 deletions
|
@ -124,6 +124,8 @@ def get_aws_connection_info(module, boto3=False):
|
||||||
if not region:
|
if not region:
|
||||||
if 'AWS_REGION' in os.environ:
|
if 'AWS_REGION' in os.environ:
|
||||||
region = os.environ['AWS_REGION']
|
region = os.environ['AWS_REGION']
|
||||||
|
elif 'AWS_DEFAULT_REGION' in os.environ:
|
||||||
|
region = os.environ['AWS_DEFAULT_REGION']
|
||||||
elif 'EC2_REGION' in os.environ:
|
elif 'EC2_REGION' in os.environ:
|
||||||
region = os.environ['EC2_REGION']
|
region = os.environ['EC2_REGION']
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue