Interview Prep/Ansible/Vault, Performance and Execution Behaviour

`ERROR! Attempting to decrypt but no vault secrets found`

BeginnerTroubleshootingVault, Performance and Execution Behaviour
Answer

Likely causes → The playbook loads a vaulted file or an !vault variable, and no password was supplied: no --ask-vault-pass, --vault-password-file or --vault-id, and no vault_password_file in ansible.cfg.

Fix →

ansible-playbook site.yml --vault-id prod@~/.secrets/prod.pass
# or in CI
ANSIBLE_VAULT_PASSWORD_FILE=/run/secrets/vault_pass ansible-playbook site.yml

Prevent → Set vault_identity_list in the project ansible.cfg, pointing at password files that CI and developers create outside the repo.

All Ansible questions Roadmap: Ansible

More on Vault, Performance and Execution Behaviour