Skip to content

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

Closed
@abadger

Description

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

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions