-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtags
executable file
·53 lines (40 loc) · 887 Bytes
/
runtags
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# copy var files to /etc/xsce for subsequent use
#./install-init
# if not the first run, repo location is here
if [ -f /etc/xsce/xsce.env ]
then
. /etc/xsce/xsce.env
cd $XSCE_DIR
fi
if [ ! -f xsce.yml ]
then
echo "XSCE Playbook not found."
echo "Please run this command from the top level of the git repo."
echo "Exiting."
exit
fi
tags=$(echo $1 | tr "," "\n")
found="N"
for tag in $tags
do
if [ "$tag" == "prep" ]
then
found="Y"
fi
done
# echo $found
taglist=$1
if [ "$found" == "N" ]
then
taglist="prep,"$taglist
fi
# script to run a specific tag in the current playbook
if [ $# -ne 1 ]; then
echo "usage: $0 <tagname>"
echo
echo " If you would like a list of possible values, enter $0 XXX"
exit 1
fi
export ANSIBLE_LOG_PATH="$XSCE_DIR/xsce-debug.log"
ansible-playbook -i ansible_hosts xsce.yml --connection=local --tags="""$taglist"""