Add tag os to deploy.sh

This commit is contained in:
Sam A. 2022-12-25 18:39:26 +01:00
parent e6b81127e1
commit 05359186d8
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -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
;;