Using Ansible Vault Effectively

Ansible is a great orchestration tool. The low barrier to entry and simplicity of Ansible are why so many people that start using it love it. But there is one feature in Ansible that probably should be used more often. That feature is Ansible Vault. Enter your email I consent to receiving your weekly newsletter, DevOps'ish SUBSCRIBE   “Vault” is a feature of ansible that allows keeping sensitive data such as passwords or keys in encrypted files, rather than as plaintext in your playbooks or roles....

October 17, 2015 · 3 min · Chris Short

Grep Multiple Ansible Vault Files

Here’s a handy one-liner to grep multiple Ansible Vault files (like group_vars). All you need is an Ansible Vault password file (outside of your configuration repo, please) and a little bash. ls -1 | while read N ; do echo -n $N: ; ansible-vault --vault-password-file ~/.ansible_vault view $N | grep <STRING> ; done

September 22, 2015 · 1 min · Chris Short