ansible/deploy.sh

24 lines
535 B
Bash
Raw Normal View History

#!/bin/sh
2021-03-04 12:52:25 +00:00
BASE_CMD="ansible-playbook playbook.yml --ask-vault-pass"
if [ -z "$1" ]; then
echo "Deploying all!"
$BASE_CMD
else
case $1 in
"services")
if [ -z "$2" ]; then
echo "Deploying all services!"
2019-02-15 09:21:06 +00:00
$BASE_CMD --tags setup_services
else
echo "Deploying services: $2"
2019-02-15 09:21:06 +00:00
$BASE_CMD --tags setup_services --extra-vars "services=$2"
fi
2022-11-11 21:16:22 +00:00
;;
"base")
$BASE_CMD --tags base_only
;;
esac
fi