-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Special variable "inventory_dir" is filled in incorrectly #5926
Comments
Is there more context of the error you're seeing here? Perhaps more verbosity, or a traceback? |
@ryanpetrello it is just a file not found error because the inventory_dir variable is filled in differently when running in awx. Running the playbook locally using Ansible (2.8.5) works fine because the inventory_dir variable is filled in correctly there. I use the inventory_dir variable to construct the rest of my paths (eg. Filepaths for files I want to copy form local to remote host) Thanks for your comment, If you need any more information please let me know! |
AWX gathers inventory by connecting to the database to pull information on the imported inventory. There is not an inventory directory in this context; it will likely be set to a temporary directory where this inventory is pulled. You'll need to calculate this differently. |
Knowing all the internals and specifics of AWX... could you specify, how we would do that exactly? |
ISSUE TYPE
SUMMARY
The special variable "inventory_dir" has the wrong value according to the ansible docs.
ENVIRONMENT
STEPS TO REPRODUCE
When using a project from GIT the inventory_dir is incorrect.
Steps to reproduce:
EXPECTED RESULTS
As described in the docs https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html inventory_dir should be filled in with the directory where your host is first defined in the inventory file, in my case /inventory/myTest/
ACTUAL RESULTS
inventory_dir points at the root of my project.
ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: