-
Notifications
You must be signed in to change notification settings - Fork 16
/
install-menu
executable file
·38 lines (28 loc) · 989 Bytes
/
install-menu
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
#!/bin/bash -x
if [ -f /etc/iiab/iiab.env ]
then
. /etc/iiab/iiab.env
else
echo "IIAB Config not found."
echo "Please install Internet in a Box before installing the Admin Console."
echo "Exiting."
exit
fi
# facts file for admin console, assumes iiab created directory
cp ./scripts/admin_facts.fact /etc/ansible/facts.d/admin_facts.fact
PLAYBOOK="js-menu.yml"
INVENTORY="ansible_hosts"
IIAB_ADMIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! -f $IIAB_ADMIN_DIR/$PLAYBOOK ]; then
echo "Admin Console Playbook not found."
echo "Please make sure you have cloned the iiab-admin git repo."
echo "Exiting."
exit
fi
cd $IIAB_ADMIN_DIR
echo "Running local playbooks! "
# ARGS="--extra-vars '{\"target_base\":\"$IIAB_DIR\"}'"
#ARGS="target_base=$IIAB_DIR"
export ANSIBLE_LOG_PATH="$IIAB_ADMIN_DIR/admin-install.log"
#ansible-playbook -i $INVENTORY $PLAYBOOK --extra-vars "${ARGS}" --connection=local
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local