Skip to content

Commit

Permalink
Ensure boto3 verify parameter isn't overridden by setting a profile
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Aug 20, 2020
1 parent 7b9daab commit 95b0ee2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions plugins/module_utils/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,16 @@ def get_aws_connection_info(module, boto3=False):
boto_params = dict(aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
aws_session_token=security_token)
if validate_certs and ca_bundle:
boto_params['verify'] = ca_bundle
else:
boto_params['verify'] = validate_certs

if profile_name:
boto_params = dict(aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None)
boto_params['profile_name'] = profile_name

if validate_certs and ca_bundle:
boto_params['verify'] = ca_bundle
else:
boto_params['verify'] = validate_certs

else:
boto_params = dict(aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
Expand Down

0 comments on commit 95b0ee2

Please sign in to comment.