Skip to content
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

use AWS inventory plugin (instead of deprecated ec2.py inventory 'script') #168

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lhoss
Copy link
Contributor

@lhoss lhoss commented Sep 2, 2019

A PR that was long overdue, since I've used the AWS inventory plugin now since most of 2019.

Notes

  • Inventory plugins were introduced since ansible v2.4, and since then are the recommended way to configure dynamic (cloud) inventories
  • Docs: https://docs.ansible.com/ansible/latest/plugins/inventory.html
  • Added advantages:
    • no more need to package (and git manage) lengthy scripts
    • smaller config, more flexible
    • This Repository's License can be harmonized to only "Apache License", once we have replaced all other Cloud inventory scripts by the respective inventory plugin
  • the ansible.cfg inventory section I added, thx to the auto entry, should work for any cloud plugin (in recent ansible versions), but if you still run with older ansible versions (as 2.5.x) you might need to explicitly add the plugin to make it work (in this case aws_ec2). At least I had experienced trouble when I used the AWS plugin with ansible <v2.7.x

@seanorama
Copy link
Collaborator

Will existing users of the old AWS approach need to change anything or be impacted by the change?

@lhoss
Copy link
Contributor Author

lhoss commented Apr 24, 2020

Will existing users of the old AWS approach need to change anything or be impacted by the change?

Hi Sean

  • Indeed this change will impact users with existing old (AWS)approach cfg, due to the change in
    add_nodes_aws.yml
    • maybe would need to branch into a new major version (from the other side, not sure how many people still interested in this role.. with CDP being the future)
  • (If this change is accepted) ideally we should also migrate the other cloud providers

@lhoss lhoss force-pushed the use_aws_inventory_plugin branch from a633972 to b132820 Compare July 3, 2020 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants