mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Merge pull request #596 from jvonau/1204
Quiet down warnings for absent distro specific files
This commit is contained in:
commit
06d9cceca8
1 changed files with 19 additions and 10 deletions
29
iiab-network
29
iiab-network
|
@ -4,25 +4,34 @@
|
||||||
CWD=`pwd`
|
CWD=`pwd`
|
||||||
export ANSIBLE_LOG_PATH="$CWD/iiab-network.log"
|
export ANSIBLE_LOG_PATH="$CWD/iiab-network.log"
|
||||||
|
|
||||||
if [ ! -f iiab-network.yml ]
|
if [ ! -f iiab-network.yml ]; then
|
||||||
then
|
echo "IIAB Playbook not found."
|
||||||
echo "IIAB Playbook not found."
|
echo "Please run this command from the top level of the git repo."
|
||||||
echo "Please run this command from the top level of the git repo."
|
echo "Exiting."
|
||||||
echo "Exiting."
|
exit 1
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /etc/iiab/config_vars.yml ]
|
if [ ! -f /etc/iiab/config_vars.yml ]; then
|
||||||
then
|
mkdir -p /etc/iiab
|
||||||
touch /etc/iiab/config_vars.yml
|
echo "{}" > /etc/iiab/config_vars.yml
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/iiab/iiab.env ]; then
|
||||||
|
source /etc/iiab/iiab.env
|
||||||
|
else
|
||||||
|
OS="unknown"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Start=`date`
|
Start=`date`
|
||||||
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
||||||
End=`date`
|
End=`date`
|
||||||
echo "" >> iiab-network.log
|
echo "" >> iiab-network.log
|
||||||
if [ ! "OS" == "debian" ]; then
|
# redhat path
|
||||||
|
if [ ! "OS" == "debian" ] && [ ! "OS" == "unknown" ]; then
|
||||||
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
|
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
|
||||||
|
fi
|
||||||
|
# ubuntu destop might be using NM - split out.
|
||||||
|
if [ $(which nmcli) ]; then
|
||||||
nmcli d >> iiab-network.log
|
nmcli d >> iiab-network.log
|
||||||
nmcli c >> iiab-network.log
|
nmcli c >> iiab-network.log
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue