`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.
More on Vault, Performance and Execution Behaviour
`ERROR! Decryption failed (no vault secrets were found that could decrypt) on inventories/prod/group_vars/all/vault.yml`BeginnerBoth `--vault-id [email protected]` and `--vault-id prod@prompt` are passed, and prod files still fail to decryptIntermediate`Vault format unhexlify error: Odd-length string` after pasting an `encrypt_string` valueIntermediate`Problem running vault password script /home/ci/.vault_pass ([Errno 8] Exec format error). If this is not a script, remove the executable bit from the file.`AdvancedEvery change to `vault.yml` produces an unreadable diff and constant merge conflictsIntermediateVaulted variables are undefined, although the file decrypts fine with `ansible-vault view`Beginner