-
Notifications
You must be signed in to change notification settings - Fork 341
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
Add common helper for ec2 client 'ensure_tags' #309
Add common helper for ec2 client 'ensure_tags' #309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had this in my TODO backlog so thanks very much for beating me to it @tremble :)
Unit tests would be most welcome.
ae920bd
to
e0e5bee
Compare
e0e5bee
to
62250a1
Compare
After discussion with @jillr we don't think it's worth trying to build unit tests, the code is thoroughly tested by integration tests |
ed877a5
to
b55c028
Compare
@jillr if possible I'd like to get this in before 2.0.0, not bothered about 1.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you @tremble.
recheck |
For some reason it failed to find community.aws.ec2_instance... |
It's a little strange because it said it was redirecting it to community.aws.ec2_instance... |
Yes, you are right... so this shouldn't be the problem. However, I tried to explicitly use the FQDN (it didn't help). I noticed the same error in the other PRs as well. I will try asking Gonéri later. |
recheck |
Indeed, there is nothing from a CI perspective that define the dependency between the two collections. I've pushed a fix to address the problem. |
Update module name deprecation messages to be more helpful
Depends-On: ansible/ansible-zuul-jobs#876
SUMMARY
We're copy&pasting our 'ensure_tags' code all over the place. Move the ensure_tags code for EC2 resources into module_utils
Note: It might work for other boto3 clients, but it's intended only for ec2 boto3 clients (unfortunately boto3 isn't consistent)
ISSUE TYPE
COMPONENT NAME
ec2_vol
ec2_vpc_subnet
ec2_tag
ec2_tag_info
ADDITIONAL INFORMATION
Todo: