mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
	
		
			956 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
	
		
			956 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/bin/bash
 | |
| # running from a git repo
 | |
| # ansible files exist
 | |
| CWD=`pwd`
 | |
| export ANSIBLE_LOG_PATH="$CWD/iiab-network.log"
 | |
| 
 | |
| if [ ! -f iiab-network.yml ]
 | |
| then
 | |
|  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"
 |