On another project, I have my inventory file in a directory called env/sandbox
├── env
│ └── sandbox
│ ├── group_vars
│ │ └── all
│ └── inventory
I then created this at the root of the ansible directory, with different variables.
├── group_vars
│ └── all
Running ansible-playbook -i env/sandbox/inventory site.yml, values from group_vars/all is used, instead of env/sandbox/group_vars/all.
I am confused. While it is suggested one may elect to have group_vars in the root directory, my understanding was that group_vars was relative to inventory. Apparently not.