1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 11:12:06 +00:00
iiab/iiab-network

40 lines
862 B
Text
Raw Normal View History

#!/bin/bash
if [ -f /etc/iiab/iiab.env ]
then
. /etc/iiab/iiab.env
2017-10-24 16:39:49 +00:00
cd $IIAB_DIR
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`
if [ ! -f iiab-network.yml ]
then
2017-10-24 16:39:49 +00:00
echo "IIAB Playbook not found."
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"
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