2017-06-09 23:25:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -f /etc/iiab/iiab.env ]
|
|
|
|
then
|
|
|
|
. /etc/iiab/iiab.env
|
2017-10-24 16:39:49 +00:00
|
|
|
cd $IIAB_DIR
|
2017-06-09 23:25:56 +00:00
|
|
|
else
|
|
|
|
echo /etc/iiab/iiab.env is missing. Playbook has not been run.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-10-24 16:39:49 +00:00
|
|
|
CWD=`pwd`
|
|
|
|
|
2017-06-09 23:25:56 +00:00
|
|
|
if [ ! -f iiab-network.yml ]
|
|
|
|
then
|
2017-10-24 16:39:49 +00:00
|
|
|
echo "IIAB Playbook not found."
|
2017-06-09 23:25:56 +00:00
|
|
|
echo "Please run this command from the top level of the git repo."
|
|
|
|
echo "Exiting."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f /etc/iiab/config_vars.yml ]
|
|
|
|
then
|
|
|
|
touch /etc/iiab/config_vars.yml
|
|
|
|
fi
|
|
|
|
|
2017-10-24 16:39:49 +00:00
|
|
|
export ANSIBLE_LOG_PATH="$CWD/iiab-network.log"
|
2017-06-09 23:25:56 +00:00
|
|
|
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
|
|
|
echo "" >> iiab-network.log
|
|
|
|
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
|
|
|
|
if [ ! "OS" == "debian" ]; then
|
|
|
|
nmcli d >> iiab-network.log
|
|
|
|
nmcli c >> iiab-network.log
|
|
|
|
fi
|
|
|
|
brctl show >> iiab-network.log
|
|
|
|
echo "run on:" >> iiab-network.log
|
|
|
|
date >> iiab-network.log
|
|
|
|
echo "" >> iiab-network.log
|
|
|
|
echo "" >> iiab-network.log
|