Skip to content

Instantly share code, notes, and snippets.

@1davidmichael
Forked from speshak/vault_grep
Last active February 15, 2017 21:35
Show Gist options
  • Save 1davidmichael/e09b1939913ffda501ec88b9383221b5 to your computer and use it in GitHub Desktop.
Save 1davidmichael/e09b1939913ffda501ec88b9383221b5 to your computer and use it in GitHub Desktop.
vault_grep
#!/bin/sh
SEARCH=$1
for vault in $(grep -Rl ANSIBLE_VAULT .); do
ansible-vault decrypt --output=- $vault | grep ${SEARCH} | sed -e "s~^~${vault}: ~"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment