Don't use if around case
This commit is contained in:
parent
ac25b9b73a
commit
a4bc8582e8
10
provision.sh
10
provision.sh
|
@ -20,10 +20,9 @@ install_modules() {
|
||||||
cd "$(dirname "$0")" || exit 255
|
cd "$(dirname "$0")" || exit 255
|
||||||
BASE_CMD="ansible-playbook playbook.yml --ask-vault-pass --ask-become-pass"
|
BASE_CMD="ansible-playbook playbook.yml --ask-vault-pass --ask-become-pass"
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
case $1 in
|
||||||
$BASE_CMD
|
"")
|
||||||
else
|
install_modules; $BASE_CMD ;;
|
||||||
case $1 in
|
|
||||||
os|docker)
|
os|docker)
|
||||||
install_modules; $BASE_CMD --tags "$1" ;;
|
install_modules; $BASE_CMD --tags "$1" ;;
|
||||||
reboot)
|
reboot)
|
||||||
|
@ -46,5 +45,4 @@ else
|
||||||
usage ;;
|
usage ;;
|
||||||
*)
|
*)
|
||||||
usage >&2; exit 1 ;;
|
usage >&2; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
fi
|
|
||||||
|
|
Reference in a new issue