On CLI everything works as expected, in AWX I get this error:
“my_group_var”: “VARIABLE IS NOT DEFINED!”
It only works in AWX, if I put my group_vars under the playbooks dir. AWX does not find the variables either in group_vars or inventory/group_vars.
I have seen multiple “best practice” project structures with group_vars inside an inventory subdir. Is it possible to put group_vars/host_vars outside of my playbook folder for AWX?
Do I need to set playbook_dir or playbook_vars_root?
Please accept my sincere apology if this response comes across as somewhat blunt or even harsh, especially as this is in response to your first post. We’ve got a very supportive community growing here, and we all wish you and each other great success in our Ansible journey. That said, if you were hiking and saw someone you just met about to step into a pit or off a ledge, how would you balance shouting vs. politeness? That’s my dilemma. So I write:
Then some setting is different on the CLI. Run ansible-config dump --only-changed
to see how your config differs from standard, and [if you insist on pursuing this ill-advised scheme] see if you can replicate that config in AWS AWX.
There are many threads on various discussion platforms where people try to put playbooks in places other than the top level of their Ansible projects. There’s a theme here along the lines of, “Dr., it hurts when I do this …”
Yes, you can put your inventory wherever you like, as long as you follow the inventory structure and let Ansible know where to look for it. In CLI you do that with ansible.cfg or the -i option. In AWX you specify the inventory when creating the job template.