From e1d80ce73f936635d821da914e5739de8ddea118 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Wed, 4 Jul 2018 14:03:35 -0400 Subject: [PATCH] Update sync.sh --- sync.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sync.sh b/sync.sh index 76036a9..c2dc5ed 100755 --- a/sync.sh +++ b/sync.sh @@ -1,5 +1,14 @@ #!/bin/bash -ansible-playbook -i 'localhost,' main.yml --tags default +\cd "$(dirname $0)" +if [ -z "$1" ]; then + echo "Usage:" + echo "$0 TAG1,TAG2" + echo "Available tags:" + echo "$(\ls roles | tr '\n' ' ')" + echo "Example: $0 default,vim" + exit 1 +fi +ansible-playbook -i 'localhost,' main.yml --tags $1 # Could also sync vim: # ansible-playbook -i hosts main.yml --tags default,vim # vim +'call Initialize()' +'qa'