Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2 verify parameter is overridden if profile is set and we're using boto3 #129

Closed
abadger opened this issue Aug 11, 2020 · 0 comments · Fixed by #147
Closed

ec2 verify parameter is overridden if profile is set and we're using boto3 #129

abadger opened this issue Aug 11, 2020 · 0 comments · Fixed by #147
Assignees

Comments

@abadger
Copy link

abadger commented Aug 11, 2020

SUMMARY

I was looking at the code in get_aws_connection_info and think I found a bug with validate_certs and profile.

If, in your playbook, you set

validate_certs: False
profile: profile_name_here

the code will set boto_params['verify'] = validate_certs here https://github.com/ansible-collections/amazon.aws/blob/main/plugins/module_utils/ec2.py#L326 but then immediately afterwards, overwrite that here: https://github.com/ansible-collections/amazon.aws/blob/main/plugins/module_utils/ec2.py#L332 That would mean the default boto value of verify is used instead of the value set in the playbook.

This should be fixable by setting boto_params['verify'] after the profile is set. That is the strategy which the non-boto3 section of code seems to take: https://github.com/ansible-collections/amazon.aws/blob/main/plugins/module_utils/ec2.py#L340

ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
 5cfd130 
CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

@tremble tremble self-assigned this Aug 20, 2020
jillr pushed a commit that referenced this issue Aug 26, 2020
…147)

* Ensure boto3 verify parameter isn't overridden by setting a profile

fixes: #129

* Add regression tests

* Fix deprecation warning in test

* changelog fragment
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
* Enable all sanity tests.

* Update ignore.txt.

Co-authored-by: Jill R <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants