Skip to content

Instantly share code, notes, and snippets.

@speshak
Last active September 15, 2020 15:52
Show Gist options
  • Save speshak/6abd3ea9893788729e812c1e0d2670db to your computer and use it in GitHub Desktop.
Save speshak/6abd3ea9893788729e812c1e0d2670db 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