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. {{ highlight bash }} ls -1 | while read N ; do echo -n $N: ; ansible-vault –vault-password-file ~/.ansible_vault view $N | grep ; done {{ / highlight }} Sign up for DevOps'ish! DevOps'ish is a weekly newsletter covering DevOps, Cloud Native, Open Source, and the 'ish between. [Read More]