From: Thorsten Date: Sat, 25 Jan 2020 20:38:51 +0000 (+0100) Subject: improve deploy.sh X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=fbd20f1bac00f00b2fd164ab0d4cb7afab811ff9;p=urlbot-v3.git improve deploy.sh --- diff --git a/deploy/deploy.sh b/deploy/deploy.sh index d13c998..c0e7f23 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -1,7 +1,12 @@ #!/bin/bash -source ~/.virtualenvs/ansible/bin/activate +[ "$(pwd | rev | cut -d/ -f1 | rev)" == "deploy" ] || pushd deploy || exit + +# shellcheck disable=SC1090 +source "${HOME}/.virtualenvs/ansible/bin/activate" export ANSIBLE_VAULT_PASSWORD_FILE=vault.sh ansible-playbook -i hosts deploy.yml -D + +popd || exit