mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
27 lines
864 B
Bash
Executable file
27 lines
864 B
Bash
Executable file
#!/bin/bash
|
|
|
|
PLAYBOOK="iiab-support.yml"
|
|
INVENTORY="ansible_hosts"
|
|
CWD=`pwd`
|
|
|
|
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
|
|
|
if [ ! -f $PLAYBOOK ]; then
|
|
echo -e "\nEXITING: $PLAYBOOK not found.\n"
|
|
echo -e "Please run this command from /opt/iiab/iiab (top of git repo).\n"
|
|
exit 1
|
|
fi
|
|
|
|
echo -en "\nWhat OpenVPN machine name do you want? "
|
|
read ans < /dev/tty
|
|
if [ "$ans" != "" ]; then
|
|
sed -i -e "s/^openvpn_handle:.*/openvpn_handle: $ans/" /etc/iiab/local_vars.yml
|
|
echo -e "\nYour machine's openvpn_handle will now be set... \n"
|
|
else
|
|
echo -e "\nWARNING: your machine's openvpn_handle will remain unchanged...\n"
|
|
fi
|
|
|
|
sed -i -e "s/^openvpn_install:.*/openvpn_install: True/" /etc/iiab/local_vars.yml
|
|
sed -i -e "s/^openvpn_enabled:.*/openvpn_enabled: True/" /etc/iiab/local_vars.yml
|
|
|
|
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
|