fallback when secret service is not available
This commit is contained in:
parent
c5f03b7b29
commit
d2a96c7f7b
3 changed files with 11 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
secret-tool lookup ansible_vault homeservers
|
||||
pass=`secret-tool lookup ansible_vault homeservers`
|
||||
retval=$?
|
||||
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo Provide password:
|
||||
read -s pass
|
||||
fi
|
||||
echo $pass
|
||||
|
|
Reference in a new issue