Adding some stuff to deploy.sh to make things easier - I think

This commit is contained in:
Víðir Valberg Guðmundsson 2019-02-15 10:19:24 +01:00
parent 8d1f3a4955
commit e5427616dc
1 changed files with 19 additions and 0 deletions

19
deploy.sh Normal file → Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
BASE_CMD="ansible-playbook playbook.yml -i datacoop_hosts --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!"
$BASE_CMD --tags setup_services --ask-vault-pass
else
echo "Deploying services: $2"
$BASE_CMD --tags setup_services --ask-vault-pass --extra-vars "services=$2"
fi
esac
fi