Ansible Vault

Ansible's built-in feature and command for encrypting secrets such as passwords and keys so the encrypted files can live in the project.

In more detail

ansible-vault create, edit and encrypt write files whose content is AES256 ciphertext under a one-line header naming the format, and playbooks decrypt them in memory when given the vault password. Vault protects data at rest only: a task that prints or logs a secret still leaks it. Always edit vaulted files with the ansible-vault command; hand-editing the ciphertext corrupts it.

Examples

ansible-vault create group_vars/all/vault.yml
ansible-vault edit group_vars/all/vault.yml

Related terms

Taught in

References

Certification courses