summaryrefslogtreecommitdiff
path: root/common/utils.sh
diff options
context:
space:
mode:
Diffstat (limited to 'common/utils.sh')
-rw-r--r--common/utils.sh6
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