From e5427616dc810a3384cba9278f76fc27bb89a0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Fri, 15 Feb 2019 10:19:24 +0100 Subject: [PATCH] Adding some stuff to deploy.sh to make things easier - I think --- deploy.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) mode change 100644 => 100755 deploy.sh diff --git a/deploy.sh b/deploy.sh old mode 100644 new mode 100755 index e69de29..c85026f --- a/deploy.sh +++ b/deploy.sh @@ -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