summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud/amazon/iam_cert.py
diff options
context:
space:
mode:
authorShayne Clausson <shayne.clausson@stelligent.com>2015-09-28 19:50:02 +0200
committerMatt Clay <matt@mystile.com>2016-12-08 11:23:38 -0500
commit92f88a4cb47756079f7280761fd4bdcf498ee695 (patch)
tree7ccf6de5f1db3a5a0b234909e212b3e7eed23d8f /lib/ansible/modules/cloud/amazon/iam_cert.py
parentf91cc1d3e57d6e73cd391fcbdde0e9794f1982e7 (diff)
downloadansible-92f88a4cb47756079f7280761fd4bdcf498ee695.tar.gz
Replaces 'old' get_ec2_creds connection method with get_aws_connection_info to support passing in security_token for temporary creds.
Diffstat (limited to 'lib/ansible/modules/cloud/amazon/iam_cert.py')
-rw-r--r--lib/ansible/modules/cloud/amazon/iam_cert.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/ansible/modules/cloud/amazon/iam_cert.py b/lib/ansible/modules/cloud/amazon/iam_cert.py
index 1f58be753c..53b2368bd3 100644
--- a/lib/ansible/modules/cloud/amazon/iam_cert.py
+++ b/lib/ansible/modules/cloud/amazon/iam_cert.py
@@ -241,13 +241,10 @@ def main():
if not HAS_BOTO:
module.fail_json(msg="Boto is required for this module")
- ec2_url, aws_access_key, aws_secret_key, region = get_ec2_creds(module)
+ region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
try:
- iam = boto.iam.connection.IAMConnection(
- aws_access_key_id=aws_access_key,
- aws_secret_access_key=aws_secret_key,
- )
+ iam = boto.iam.connection.IAMConnection(**aws_connect_kwargs)
except boto.exception.NoAuthHandlerFound, e:
module.fail_json(msg=str(e))