-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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_vpc_peer update allowing absent/present to perform all actions #37716
Conversation
The test
The test
The test
The test
The test
The test
The test
The test
|
The test
|
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.
From a cursory manual testing this looks good. A couple things: every API call should handle ClientError and BotoCoreError. If you update the module to use AnsibleAWSModule that will simplify the exception handling so you can just call module.fail_json_aws(e) and it will add the traceback and e.response if there is one. https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/GUIDELINES.md#using-fail_json_aws
Secondly, since this module is stableinterface there really needs to be integration tests to make sure backwards compatibility is not broken. Let me know if you need help putting that together (ec2_group as an example: https://github.com/ansible/ansible/tree/devel/test/integration/targets/ec2_group).
@andynelson Given that:
Therefore I'm going to close this. If you or anyone else wants to continue with this work then please do feel free to create a fresh PR and |
SUMMARY
This update:
In addition, on reject/removal tasks, the removed peering id is now returned
accept/reject are kept as synonyms for present/absent
ISSUE TYPE
COMPONENT NAME
ec2_vpc_peer.py
ANSIBLE VERSION
ADDITIONAL INFORMATION
When running peering between multiple VPCs that may or may not be in the same inventory, running an explicit sequence of 'present' > 'accept' is no longer necessary - just running with 'present' against both inventories in any order will result in a completed peering.
The same is true for removal -
state: absent