-
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
New facts module for AWS VPC Peering #19910
New facts module for AWS VPC Peering #19910
Conversation
Migrated from ansible/ansible-modules-extras#1431 by willthames (not original author) |
Tested on Ansible 2.2, works nicely for me, would be awesome if this could be included upstream! Need such a module to construct routing tables by querying VPC peerings. |
@mmochan @michaeljs1990 @wimnat @erydo @jarv @steynovich @ryansydnor @simplesteph @Java1Guy @rmorlok @pwnall @naslanidis @pjodouin @RickMendes @amir343 @linuxdynasty @timmahoney @tedder @jsdalton @jmenga @tastychutney @scottanderson42 @mjschultz @bpennypacker @zimbatm @brandond @joelthompson @alachaum @TomBamford @jjshoe @j-carl @fiunchinho @Etherdaemon @bekelchik @minichate @MichaelBaydoun @loia @akazakov @Zeekin @silviud @whiter As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add |
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.
Otherwise LGTM, just needs to return normalized snake case variables.
|
||
results = get_vpc_peers(ec2, module) | ||
|
||
module.exit_json(result=results) |
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.
For results, it looks like you're returning the camelcase output from boto3. Can you please use camel_dict_to_snake_dict
to normalize the returned values?
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.
Done
f7eb506
to
9627374
Compare
Closing and re-opening to trigger CI. |
CI failure due to module validation failures:
|
9627374
to
30be0db
Compare
30be0db
to
051461f
Compare
4f21648
to
5c93e0e
Compare
Just tested the new version with Ansible 2.3 and it works fine for me, just had to adjust playbooks re. snake case / camel case. Looks good to me, a very useful module! Not sure what else I could do to get this merged eventually, too bad it didn't make it into 2.3... shipit |
Update version to 2.3 Update for python3 exception handling Use ansible_dict_to_boto3_filter_list rather than duplicating implementation Use camel_dict_to_snake_dict on results for ansible standard results Tidy up flake8 compliance
Add supports_check_mode to the module declaration
Update version to 2.4 Add ANSIBLE_METADATA Move imports
5c93e0e
to
d8223ad
Compare
SUMMARY
Retrieves AWS VPC Peering details using AWS methods. Requires Boto3.
Filters can be found http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcPeeringConnections.html
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
ec2_vpc_peering_facts module
ANSIBLE VERSION
2.3
ADDITIONAL INFORMATION