I've got an ansible setup that looks like this
inventories/ sandbox1 group_vars/ all sandbox1 pb/ pb1/ run_pb1.yml
I've got roles and other stuff too, but I think this is enough to capture the gist of what I need to do.
I've got a variable foo that I am defining inside inventories/group_vars/all AND inventories/group_vars/sandbox1
Now my issue is that whenever I call
ansible-playbook -i inventories/sandbox1 pb/pb1/run_pb1.yml
The playbook is run with the value of foo that is contained in inventories/group_vars/all... put another way, foo is not being picked up from the inventories/group_vars/sandbox1
Is this the correct way to implement an inventory specific variable? I want to avoid creating mulitple playbooks for something as simple as a variable change... ie, I do not want to do something like this inside the "all" file
default_foo: bar sandbox1_foo: baz
along with multiple playbooks, which would be the same except for the variable they reference.
Is there a way to do what I am asking?