Last active
September 15, 2020 15:52
-
-
Save speshak/6abd3ea9893788729e812c1e0d2670db to your computer and use it in GitHub Desktop.
vault_grep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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