DevOps / Ansible Interview questions
What is Ansible Vault?
Ansible Vault is a built-in feature for encrypting sensitive content, like passwords, API keys, or entire variable files, so secrets can be safely committed to version control alongside the rest of a playbook.
ansible-vault encrypt secrets.yml ansible-vault view secrets.yml ansible-playbook site.yml --ask-vault-pass
Vault can encrypt a whole file or just a single string value with ansible-vault encrypt_string, letting a sensitive value sit inline in an otherwise plaintext file. At runtime, ansible-playbook needs the vault password, supplied interactively, from a password file, or via a vault ID for setups using multiple different passwords, to decrypt the content in memory before use. This keeps secrets out of plaintext in the repository while still letting playbooks reference them like any other variable.
More Related questions...