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

41 lines
956 B
Text
Raw Normal View History

#!/bin/bash
2017-10-30 17:57:55 +00:00
# running from a git repo
# ansible files exist
2017-10-24 16:39:49 +00:00
CWD=`pwd`
2017-10-30 17:57:55 +00:00
export ANSIBLE_LOG_PATH="$CWD/iiab-network.log"
2017-10-24 16:39:49 +00:00
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
Start=`date`
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
End=`date`
echo "" >> iiab-network.log
if [ ! "OS" == "debian" ]; then
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
nmcli d >> iiab-network.log
nmcli c >> iiab-network.log
fi
echo "" >> iiab-network.log
ip r >> iiab-network.log
echo "" >> iiab-network.log
brctl show br0>> iiab-network.log
echo "run start: $Start" >> iiab-network.log
echo "run end: $End" >> iiab-network.log
echo "" >> iiab-network.log
echo "" >> iiab-network.log
ip r
brctl show br0
echo "run start:$Start"
echo "run end: $End"