take vault password from secret service

This commit is contained in:
Pim Kunis 2023-02-24 22:18:50 +01:00
parent a8df259081
commit cb861223ea
2 changed files with 15 additions and 1 deletions

View file

@ -1,5 +1,9 @@
[defaults]
# (pathspec) Colon separated paths in which Ansible will search for Roles.
roles_path=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
vault_password_file=./.vault_password
inventory=inventory
vault_password_file=util/secret-service-client.sh
interpreter_python=/usr/bin/python3
[diff]
always = True

View file

@ -0,0 +1,10 @@
#!/bin/bash
pass=`secret-tool lookup ansible_vault homeservers`
retval=$?
if [ $retval -ne 0 ]; then
echo Provide password:
read -s pass
fi
echo $pass