-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvm-localdev
More file actions
executable file
·31 lines (26 loc) · 795 Bytes
/
Copy pathvm-localdev
File metadata and controls
executable file
·31 lines (26 loc) · 795 Bytes
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
#!/bin/bash
# shellcheck disable=SC2034
DIR_INC="$(cd .. && cd .. && pwd)/scripts"
# shellcheck disable=SC2034
DIR_ROOT="$(cd .. && cd .. && pwd)"
if [[ -d $DIR_INC ]]; then
source $DIR_INC/functions.sh
doPythonCheck
fi
CURRDIR="$(pwd)"
ANSIBLEPLAYBOOK=$(which ansible-playbook)
ANSIBLE=$(which ansible)
ANSIBLE_PLAYBOOK="vm-localdev.yml"
ANSIBLE_INVENTORY="inventory/localdev.yml"
echo PARAMS="$@"
echo CURRDIR=$CURRDIR
cd $CURRDIR
$ANSIBLE --version
$ANSIBLEPLAYBOOK --version
if [[ "" == "$@" ]]; then
echo $ANSIBLEPLAYBOOK $ANSIBLE_PLAYBOOK -i $ANSIBLE_INVENTORY
$ANSIBLEPLAYBOOK $ANSIBLE_PLAYBOOK -i $ANSIBLE_INVENTORY
else
echo $ANSIBLEPLAYBOOK $ANSIBLE_PLAYBOOK -i $ANSIBLE_INVENTORY -e "$@"
$ANSIBLEPLAYBOOK $ANSIBLE_PLAYBOOK -i $ANSIBLE_INVENTORY -e "$@"
fi