Change standard AWS access and secret key parameter names to aws_access_key and aws_secret_key. Fixes an authentication problem with the rds module and standardizes the naming convention on something more encompassing than ec2_*_key.

This commit is contained in:
Scott Anderson
2014-02-08 18:35:26 -05:00
parent 3f2f5fec0a
commit baf508a379
9 changed files with 55 additions and 53 deletions

View File

@@ -471,8 +471,8 @@ def terminate_vpc(module, vpc_conn, vpc_id=None, cidr=None):
def main():
module = AnsibleModule(
argument_spec = dict(
argument_spec = ec2_argument_spec()
argument_spec.update(dict(
cidr_block = dict(),
wait = dict(choices=BOOLEANS, default=False),
wait_timeout = dict(default=300),
@@ -482,13 +482,14 @@ def main():
vpc_id = dict(),
internet_gateway = dict(choices=BOOLEANS, default=False),
route_tables = dict(type='list'),
region = dict(aliases=['aws_region', 'ec2_region'], choices=AWS_REGIONS),
state = dict(choices=['present', 'absent'], default='present'),
ec2_secret_key = dict(aliases=['aws_secret_key', 'secret_key'], no_log=True),
ec2_access_key = dict(aliases=['aws_access_key', 'access_key']),
)
)
module = AnsibleModule(
argument_spec=argument_spec,
)
state = module.params.get('state')
ec2_url, aws_access_key, aws_secret_key, region = get_ec2_creds(module)