mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 12:12:12 +00:00
scripts cleanup
This commit is contained in:
parent
17bd76097d
commit
c32b3518cd
3 changed files with 8 additions and 24 deletions
15
iiab-network
15
iiab-network
|
@ -1,15 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /etc/iiab/iiab.env ]
|
||||
then
|
||||
. /etc/iiab/iiab.env
|
||||
cd $IIAB_DIR
|
||||
else
|
||||
echo /etc/iiab/iiab.env is missing. Playbook has not been run.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# running from a git repo
|
||||
# ansible files exist
|
||||
CWD=`pwd`
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-network.log"
|
||||
|
||||
if [ ! -f iiab-network.yml ]
|
||||
then
|
||||
|
@ -25,7 +18,6 @@ then
|
|||
fi
|
||||
|
||||
Start=`date`
|
||||
export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-network.log"
|
||||
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
||||
End=`date`
|
||||
echo "" >> iiab-network.log
|
||||
|
@ -46,4 +38,3 @@ ip r
|
|||
brctl show br0
|
||||
echo "run start:$Start"
|
||||
echo "run end: $End"
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ PLAYBOOK="iiab-base.yml"
|
|||
INVENTORY="ansible_hosts"
|
||||
CWD=`pwd`
|
||||
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
||||
|
||||
if [ ! -f $PLAYBOOK ]
|
||||
then
|
||||
echo "IIAB Playbook not found."
|
||||
|
@ -15,5 +17,4 @@ fi
|
|||
sed -i -e "s/openvpn_install: False/openvpn_install: True/" vars/local_vars.yml
|
||||
sed -i -e "s/openvpn_enabled: False/openvpn_enabled: True/" vars/local_vars.yml
|
||||
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
||||
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
|
||||
|
|
14
runtags
14
runtags
|
@ -1,16 +1,11 @@
|
|||
#!/bin/bash
|
||||
# running from a git repo
|
||||
PLAYBOOK="iiab.yml"
|
||||
INVENTORY="ansible_hosts"
|
||||
# Pass cmdline options for ansible
|
||||
|
||||
if [ -f /etc/iiab/iiab.env ]
|
||||
then
|
||||
. /etc/iiab/iiab.env
|
||||
cd $IIAB_DIR
|
||||
fi
|
||||
|
||||
CWD=`pwd`
|
||||
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-debug.log"
|
||||
|
||||
if [ ! -f $PLAYBOOK ]
|
||||
then
|
||||
echo "IIAB Playbook not found."
|
||||
|
@ -41,8 +36,6 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
# echo $found
|
||||
|
||||
taglist=$1
|
||||
|
||||
if [ "$found" == "N" ]
|
||||
|
@ -50,5 +43,4 @@ then
|
|||
taglist="0-init,"$taglist
|
||||
fi
|
||||
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-debug.log"
|
||||
ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist"""
|
||||
|
|
Loading…
Reference in a new issue