From 5f9485499c3bbf8862a75595b28707d542d74a6e Mon Sep 17 00:00:00 2001 From: "Michael J. Schultz" Date: Wed, 13 Nov 2013 16:01:39 -0600 Subject: [PATCH] Check for AWS keys using boto names - see https://github.com/boto/boto#getting-started-with-boto --- lib/ansible/module_utils/ec2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/module_utils/ec2.py b/lib/ansible/module_utils/ec2.py index eac7c5be75d..a8de16fb01d 100644 --- a/lib/ansible/module_utils/ec2.py +++ b/lib/ansible/module_utils/ec2.py @@ -16,6 +16,8 @@ def get_ec2_creds(module): if not ec2_access_key: if 'EC2_ACCESS_KEY' in os.environ: ec2_access_key = os.environ['EC2_ACCESS_KEY'] + elif 'AWS_ACCESS_KEY_ID' in os.environ: + ec2_access_key = os.environ['AWS_ACCESS_KEY_ID'] elif 'AWS_ACCESS_KEY' in os.environ: ec2_access_key = os.environ['AWS_ACCESS_KEY'] else: @@ -24,6 +26,8 @@ def get_ec2_creds(module): if not ec2_secret_key: if 'EC2_SECRET_KEY' in os.environ: ec2_secret_key = os.environ['EC2_SECRET_KEY'] + elif 'AWS_SECRET_ACCESS_KEY' in os.environ: + ec2_secret_key = os.environ['AWS_SECRET_ACCESS_KEY'] elif 'AWS_SECRET_KEY' in os.environ: ec2_secret_key = os.environ['AWS_SECRET_KEY'] else: