-
Notifications
You must be signed in to change notification settings - Fork 19
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
inventory as real plugins #41
Comments
So, I fail to see why would a role provides a plugin for inventory, isn't it too late ? |
not at 'compile time' it is too late for include_role |
|
just rephrasing that? |
A couple of ideas.
I wrote up a bunch of things on https://serge.vanginderachter.be/2016/current-state-of-the-ansible-inventory-and-how-it-might-evolve/ - I still need to elaborate on that, |
Adding a comment here based on an IRC conversation. Based on the jargon mentioned in here already, I can't tell if this has already been specified as being included in the refactor. Being able to use inventory/host 'patterns' when defining groups in inventory would be fabulous. ie:
This would all one to use the |
You can create a plugin inventory source that supports that. I'm only trying to create a refactoring of the current framework to allow it to be easier to expand, detailed things like that are no in the scope of this proposal (though will be made easy to add by it). |
+1 |
Echoing @srvg and @jaddison a bit, but I think it's worth referencing ansible/ansible#9065 here as motivation to accept/approve this proposal. The thread is a long list of people (including myself most recently) who've encountered the group_vars precedence limitations in the current inventory system and did a bit of a double take. It'd be nice if there was a mechanism which allows users to choose which CM trade offs make the most sense for them. |
Proposal: inventory plugins
Author: Brian Coca <@bcoca>
Date: 2016/11/-1
Motivation
Current inventory is overtly complex, non modular and mostly still a legacy from 1.x tree. We also want to add a common set of features to most inventory sources but are hampered by the current code base.
The plugin architecture has been very successful with other subsystems and can be leveraged here to make a better experience for users vs the manual copying of inventory scripts and configs they do now.
It was already scheduled for revamp for 2.0 but kept getting delayed due to other priorities.
Problems
The current 'plugins' (directory, ini, yaml and script) are mostly hardcoded to each other and don't allow for flexible behaviour making it very hard to add features.
We currently rely mostly on inventory scripts which re-implement many things and diverge in feature set.
Solution proposal
meta: refresh_inventory
Dependencies
Bonus points
start converting inventory scripts into plugins (ec2/gce/vmware/azure/docker/etc)
The text was updated successfully, but these errors were encountered: