I have scoured through the web and the ansible documentation, but I have not been able to find an answer for this question.
Say the structure is as follows:
./playbooks/foo.yml
./hosts/HOST_NAME (Contains IP for a specific host)
./hosts/host_vars/HOST_NAME/vault1
./hosts/host_vars/HOST_NAME/vault2
When I run the command:
ansible-playbook -i hosts/HOST_NAME playbooks/foo.yml
- Will ansible use vault1 or vault2 per default?
- If it looks in both, what happens if both vaults have defined the same variable? That is:
- vault1 -> username: user1
- vault2 -> username: user2
- If it looks in both, will the command fail if one of the vaults fail the decryption?