This might be a really dumb question. I am working on a project where the directory structure looks like the tree below. I am looking for confirmation from the forum that this will not read anything group_vars, as group_vars from what I can deduct, should live within the inventory directory, being relative to the inventory (and this cannot be changed in ansible.cfg?). Is my understanding correct?
├── apserver.yml
├── dbservers.yml
├── group_vars
│ ├── all (F)
│ ├── apservers (F)
│ └── dbservers (F)
├── inventory
│ ├── dev (F)
│ └── prod (F)
├── roles
│ ├── activemq
│ │ ├── tasks
│ │ │ ├── main.yml
For avoidance of doubt, (F) means the entry is a file.
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.