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 DevOps'ish is on hiatus and is not taking new subscribers at this time. Stay tuned to Chris Short's web site for details on future projects and when DevOps'ish will relaunch. [Read More]