Both `--vault-id [email protected]` and `--vault-id prod@prompt` are passed, and prod files still fail to decrypt
IntermediateTroubleshootingVault, Performance and Execution Behaviour
Answer
Likely causes → The vault ID label is only a hint. Ansible tries every supplied secret, so a failure means none of them is right. The file was probably encrypted with a different password than the one now called "prod", for example by someone who forgot --encrypt-vault-id. With vault_id_match = True, only the secret whose label matches the file header is tried.
Diagnose → head -1 on the file shows the label it was encrypted with. If it has no label (1.1 format), it was encrypted without an ID.
Fix → Re-key the file to the correct ID:
ansible-vault rekey --vault-id old@prompt --new-vault-id prod@prompt file.yml
Prevent → Set encrypt_vault_id = prod in each environment's ansible.cfg, or wrap encryption in a script that always passes --encrypt-vault-id.
More on Vault, Performance and Execution Behaviour
`ERROR! Attempting to decrypt but no vault secrets found`Beginner`ERROR! Decryption failed (no vault secrets were found that could decrypt) on inventories/prod/group_vars/all/vault.yml`Beginner`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