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'