forked from xtophd/RHEL8-Workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxtoph-deploy.sh
executable file
·44 lines (35 loc) · 1.17 KB
/
xtoph-deploy.sh
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
#!/bin/bash
##
## NOTE: you must point to the correct inventory and extravars yml
##
## Take a sample configs from ./sample-configs and
## copy them to ./playbooks/config
##
myInventory="./config/master-config.yml"
if [[ ! -e "${myInventory}" || ! -e "./xtoph-deploy.yml" ]] ; then
echo "ERROR: Are you in the right directory? Can not find ${myInventory} | xtoph-deploy.yml" ; exit
exit
fi
##
##
##
case "$1" in
"deploy" | \
"undeploy" | \
"redeploy" | \
"workshop" | \
"setup+" | \
"setup")
time ansible-playbook --ask-vault-pass -i ${myInventory} -f 10 -e xtoph_deploy_cmd=${1} xtoph-deploy.yml
;;
*)
echo "USAGE: xtoph-deploy.sh [ setup | setup+ | deploy | undeploy | redeploy | workshop ]"
echo ""
echo " setup ... runs only 'setup' plays"
echo " setup+ ... runs both 'setup' and 'deploy' plays"
echo " deploy ... runs only 'deploy' plays"
echo " undeploy ... runs only 'undeploy' plays"
echo " redeploy ... runs both 'undeploy' and 'deploy' plays"
echo " workshop ... runs only the 'workshop' plays"
;;
esac