-
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
Fix Inventory Plugin Loading #31605
Merged
Merged
Fix Inventory Plugin Loading #31605
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting. Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory, as well as the ansible-provided inventory plugins (e.g. `/path/to/site-packages/ansible/plugins/inventory`).
ansibot
added
affects_2.5
This issue/PR affects Ansible v2.5
bugfix_pull_request
inventory
Inventory category
needs_triage
Needs a first human triage before being processed.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
Oct 11, 2017
I hope this makes it into 2.4.1 BTW |
bcoca
removed
the
needs_triage
Needs a first human triage before being processed.
label
Oct 11, 2017
abadger
moved this from Nominated
to To be cherrypicked (rc only)
in 2.4.x Blocker List
Oct 11, 2017
abadger
moved this from To be cherrypicked (rc only)
to In Progress
in 2.4.x Blocker List
Oct 11, 2017
ansibot
added
the
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
label
Oct 11, 2017
Errors are unstable tests due to networked repositories (outside of our control). Merging and cherry-picking for 2.4.1rc1. |
abadger
pushed a commit
that referenced
this pull request
Oct 12, 2017
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting. Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory, as well as the ansible-provided inventory plugins (e.g. `/path/to/site-packages/ansible/plugins/inventory`). (cherry picked from commit 0371d0d)
BondAnthony
pushed a commit
to BondAnthony/ansible
that referenced
this pull request
Oct 14, 2017
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting. Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory, as well as the ansible-provided inventory plugins (e.g. `/path/to/site-packages/ansible/plugins/inventory`).
mtb-xt
pushed a commit
to mtb-xt/ansible
that referenced
this pull request
Oct 15, 2017
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting. Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory, as well as the ansible-provided inventory plugins (e.g. `/path/to/site-packages/ansible/plugins/inventory`).
This was referenced Jan 31, 2018
ansibot
added
bug
This issue/PR relates to a bug.
and removed
bugfix_pull_request
labels
Mar 6, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
inventory
Inventory category
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting.
Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory,
as well as the ansible-provided inventory plugins (e.g.
/path/to/site-packages/ansible/plugins/inventory
).ISSUE TYPE
COMPONENT NAME
inventory manager
ANSIBLE VERSION
ADDITIONAL INFORMATION
My inventory plugin was only loading if I happened to be in the parent directory of a folder called 'inventory_plugins' that contained my plugin. I tried various configurations in ansible.cfg, but the
setting didn't seem to be used. To debug, I ended up adding this just after the InventoryManager loads the PluginLoader:
That line in the output said (where cwd=
/home/ubuntu
):Applying this change, the output matches what I set in my ansible.cfg. :)