Scripts to link ansible-vault and keychain. Keychain username is set to a git remote URL in git@ format if it could be determined, otherwize current system path is used instead.
git clone https://github.com/gitinsky/vaultkeychain.git
ln -vs "$PWD/vaultkeychain/vaultkeychain.py" ~/sbin/vaultkeychainOr for shell version:
ln -vs "$PWD/vaultkeychain/vaultkeychain.sh" ~/sbin/vaultkeychain[defaults]
vault_password_file = ~/sbin/vaultkeychainRun
PAGER=cat ansible-vault view vaulted.ymlPassword is vaultkeychain.
On the second run password should be retreived from your keychain.
export ANSIBLE_VAULT_PASSWORD_FILE=~/sbin/vaultkeychain