mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-22 00:00:22 -07:00
Merge pull request #5880 from willthames/ec2_modules_refactor
Create a common EC2 connection argument spec for EC2 modules
This commit is contained in:
commit
0bc0315171
8 changed files with 40 additions and 45 deletions
|
@ -8,6 +8,15 @@ AWS_REGIONS = ['ap-northeast-1',
|
|||
'us-west-2']
|
||||
|
||||
|
||||
def ec2_argument_spec():
|
||||
return dict(
|
||||
region=dict(aliases=['aws_region', 'ec2_region'], choices=AWS_REGIONS),
|
||||
ec2_url=dict(),
|
||||
ec2_secret_key=dict(aliases=['aws_secret_key', 'secret_key'], no_log=True),
|
||||
ec2_access_key=dict(aliases=['aws_access_key', 'access_key']),
|
||||
)
|
||||
|
||||
|
||||
def get_ec2_creds(module):
|
||||
|
||||
# Check module args for credentials, then check environment vars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue