diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-01-17 20:34:50 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-01-17 20:34:50 +0100 |
commit | 161f45698e467f160206cf7fe315e750a587924e (patch) | |
tree | c8791bbe0bdce134f2eacf4855009f4830e149df | |
parent | nextcloud app config (logo upload must be done manually, grrrr... (diff) |
only activate environment if we can read the passphrase
-rw-r--r-- | common/utils.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/utils.sh b/common/utils.sh index 3e31c568..262926c7 100644 --- a/common/utils.sh +++ b/common/utils.sh @@ -69,6 +69,12 @@ vault_environment__activate() { fi done + err_out=$(("gpg/get-vault-pass-$1" > /dev/null) 2>&1) + if [ -n "$err_out" ]; then + print_error "failed to activate environment: '$1' .. reading passphrase from 'gpg/get-vault-pass-$1' returned an error" + return 1 + fi + if [ -z "${ANSIBLE_VAULT_IDENTITY_LIST}" ]; then export ANSIBLE_VAULT_IDENTITY_LIST="$1@gpg/get-vault-pass-$1" else |