mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4803 from dragon3/devel
Don't fail if ec2_access_key/ec2_secret_key not specified to use IAM rol...
This commit is contained in:
commit
e4494be8c6
1 changed files with 0 additions and 4 deletions
|
@ -18,16 +18,12 @@ def get_ec2_creds(module):
|
|||
ec2_access_key = os.environ['EC2_ACCESS_KEY']
|
||||
elif 'AWS_ACCESS_KEY' in os.environ:
|
||||
ec2_access_key = os.environ['AWS_ACCESS_KEY']
|
||||
else:
|
||||
module.fail_json(msg="Please specify an ec2_access_key")
|
||||
|
||||
if not ec2_secret_key:
|
||||
if 'EC2_SECRET_KEY' in os.environ:
|
||||
ec2_secret_key = os.environ['EC2_SECRET_KEY']
|
||||
elif 'AWS_SECRET_KEY' in os.environ:
|
||||
ec2_secret_key = os.environ['AWS_SECRET_KEY']
|
||||
else:
|
||||
module.fail_json(msg="Please specify an ec2_secret_key")
|
||||
|
||||
if not region:
|
||||
if 'EC2_REGION' in os.environ:
|
||||
|
|
Loading…
Reference in a new issue