Skip to content

Instantly share code, notes, and snippets.

View gthieleb's full-sized avatar
:octocat:
Volunteering

gthieleb

:octocat:
Volunteering
View GitHub Profile
@gthieleb
gthieleb / convert-and-test.sh
Last active December 11, 2022 22:51 — forked from filipenf/convert-and-test.sh
Script to convert an ansible vault into a yaml file with encrypted strings
#!/bin/bash
#Vault password is 1
echo "Converting vault to yaml format:"
ansible-vault decrypt --output - vault | python ./convert_vault.py > new-vault.yml
echo "Decrypting a variable from the converted vault"
ansible localhost -i localhost, -e @new-vault.yml -m debug -a 'var=secret' --ask-vault-pas