Fix provision.sh

This commit is contained in:
Sam A. 2023-12-27 23:11:18 +01:00
parent 90cc378393
commit 97311b4589
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
2 changed files with 3 additions and 7 deletions

View file

@ -1,4 +1,5 @@
[defaults] [defaults]
ask_vault_pass = True
remote_user = sysadm remote_user = sysadm
remote_tmp = /tmp/.ansible remote_tmp = /tmp/.ansible
inventory = inventory inventory = inventory

View file

@ -22,7 +22,7 @@ install_modules() {
fi fi
} }
BASE_CMD="ansible-playbook playbook.yml --ask-vault-pass --ask-become-pass" BASE_CMD="ansible-playbook playbook.yml --ask-become-pass"
cd "$(dirname "$0")" || exit 255 cd "$(dirname "$0")" || exit 255
if [ "$1" = "--dry" ]; then if [ "$1" = "--dry" ]; then
@ -67,12 +67,7 @@ case $TAG in
shift shift
fi fi
case $1 in SINGLE_SERVICE="$1"
--*)
;;
*)
SINGLE_SERVICE="$1" ;;
esac
if [ -z "$ACTION" ] && [ -n "$SINGLE_SERVICE" ]; then if [ -z "$ACTION" ] && [ -n "$SINGLE_SERVICE" ]; then
VARS="single_service=$SINGLE_SERVICE" VARS="single_service=$SINGLE_SERVICE"