Open gendergap opened 6 months ago
I read through awx/main/tasks/jobs.py
a bit and found out that the parameter --playbook-dir
is actually set. It is set to the directory the inventory source is in. This by chance works well if the inventory configuration is located on the top layer (next to roles
, and inventory_plugins
). In my case, I have a bunch of inventory files which together reside in a subdirectory. AWX now uses this subdirectory as the --playbook-dir
value and cannot find the plugin.
I believe this issue just went from "feature request" to "bug".
As a workaround, I recommend to create a ansible.cfg
file in your project and to write the following inside:
[defaults]
inventory_plugins = inventory_plugins
The value of that parameter is the name of the directory you keep your plugin in (relative to the project root).
Please confirm the following
Feature type
Enhancement to Existing Feature
Feature Summary
The
ansible-inventory
command allows to set a--playbook-dir
base directory to locate all kinds of things inside a project. I personally use this to load a project-specific inventory plugin from theinventory_plugins
directory of my project. But according to the documentation, it could also be relevant in a ton of other use cases.AWX currently does not allow to set this variable for an inventory source, as far as I can see. This makes it impossible to load the dynamic inventory through the plugin for my project.
Select the relevant components
Steps to reproduce
sharepoint.py
)hosts/sharepoint.yaml
Current results
Sugested feature result
I would wish that either
--playbook-dir
with the path to the project (which seems to be/runner/project
orAdditional information
No response