From 05359186d87f8a6a2acda417a5d47eba7339800b Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sun, 25 Dec 2022 18:39:26 +0100 Subject: [PATCH] Add tag os to deploy.sh --- deploy.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/deploy.sh b/deploy.sh index 0d478ff..20c22d1 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,8 +2,9 @@ usage () { echo "Usage: $0" - echo "Usage: $0 reboot [-f|--force]" + echo "Usage: $0 os" echo "Usage: $0 services [SINGLE_SERVICE]" + echo "Usage: $0 reboot [-f|--force]" } BASE_CMD="ansible-playbook playbook.yml --ask-vault-pass --ask-become-pass" @@ -16,12 +17,8 @@ if [ -z "$1" ]; then $BASE_CMD else case $1 in - reboot) - if [ "$2" = "-f" ] || [ "$2" = "--force" ]; then - $BASE_CMD --tags reboot --extra-vars "force_reboot=true" - else - $BASE_CMD --tags reboot - fi + os) + $BASE_CMD --tags os ;; services) if [ -z "$2" ]; then @@ -30,6 +27,13 @@ else $BASE_CMD --tags services --extra-vars "single_service=$2" fi ;; + reboot) + if [ "$2" = "-f" ] || [ "$2" = "--force" ]; then + $BASE_CMD --tags reboot --extra-vars "force_reboot=true" + else + $BASE_CMD --tags reboot + fi + ;; -h|--help) usage ;;