We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
5cfd130
The text was updated successfully, but these errors were encountered:
Ensure boto3 verify parameter isn't overridden by setting a profile
95b0ee2
fixes: ansible-collections#129
Ensure boto3 verify parameter isn't overridden by setting a profile (#…
cb2f0d6
…147) * Ensure boto3 verify parameter isn't overridden by setting a profile fixes: #129 * Add regression tests * Fix deprecation warning in test * changelog fragment
Enable all sanity tests (ansible-collections#129)
f0e7d33
* Enable all sanity tests. * Update ignore.txt. Co-authored-by: Jill R <[email protected]>
tremble
Successfully merging a pull request may close this issue.
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
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
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: