Interview Prep/Ansible/Vault, Performance and Execution Behaviour

Every change to `vault.yml` produces an unreadable diff and constant merge conflicts

IntermediateTroubleshootingVault, Performance and Execution Behaviour
Answer

Likely causes → Encrypted files change completely on every edit, because each encryption uses a new salt. Two people editing the same vault file at the same time always conflict.

Fix → Get readable local diffs with a textconv:

echo '*vault*.yml diff=ansible-vault' >> .gitattributes
git config diff.ansible-vault.textconv "ansible-vault view"

To resolve a conflict, view both versions, merge the plaintext by hand, and encrypt again.

Prevent → Keep vault files small and split them per environment and per role. Consider an external secret manager for secrets that change often.

All Ansible questions Roadmap: Ansible

More on Vault, Performance and Execution Behaviour