Decrypt at Runtime with --ask-vault-pass
Supply the password to a play.
Decrypt at the Right Moment
Vaulted secrets stay encrypted on disk. The trick is feeding Ansible the password exactly when a play needs to read them. 🔑
Prompt for the Password
Add --ask-vault-pass to ansible-playbook and Ansible asks for the vault password once before the run begins.
ansible-playbook site.yml --ask-vault-passAll lessons in this course
- Encrypt a File with ansible-vault create
- Edit, View & Rekey Vault Files
- Encrypt a Single Variable Inline
- Decrypt at Runtime with --ask-vault-pass