Ansible Vault

Page content

Prepare: a password file

Create a simple password file. In this post, I store it at ~/.ansible_vault_password.

How to use

Here are the simple snippets:

# Make encrypted file and start editing
ansible-vault create --vault-password-file ~/.ansible_vault_password ./foo.key

# Edit encrypted file
ansible-vault edit --vault-password-file ~/.ansibe_vault_password ./foo.key

# Encrypt original file
ansible-vault encrypt --vault-password-file ~/.ansible_vault_password ./foo.key

Tips