mirror of
				https://gitlab.sectorq.eu/jaydee/ansible.git
				synced 2025-10-31 10:21:09 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			839 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			839 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| MODE="worker"
 | |
| mac=`ifconfig eth0 |grep ether|awk '{ print $2 }'`
 | |
| echo $mac
 | |
| syst=9
 | |
| case $mac in
 | |
| "00:1E:06:48:CE:E7")
 | |
| syst=1
 | |
| MODE="master"
 | |
| ;;
 | |
| "00:1e:06:48:cd:86")
 | |
| syst=2
 | |
| ;;
 | |
| "00:1e:06:48:d0:01")
 | |
| syst=3
 | |
| ;;
 | |
| "00:1e:06:48:d0:00")
 | |
| syst=4
 | |
| ;;
 | |
| "00:1e:06:48:cd:8e")
 | |
| syst=5
 | |
| ;;
 | |
| esac
 | |
| echo "lala" > /tmp/check.log
 | |
| hostnamectl hostname odroidc4-${syst}
 | |
| sed -i 's/^TERM=/#TERM=/g' /etc/update-motd.d/10-armbian-header
 | |
| sed -i '32 i TERM=linux toilet -f standard -F metal $(hostname)' /etc/update-motd.d/10-armbian-header
 | |
| TERM=linux toilet -f standard -F metal $(hostname)
 | |
| nmcli con mod "Wired connection 1" ipv4.addresses "192.168.77.16${syst}/24" ipv4.gateway "192.168.77.1" ipv4.dns "192.168.77.1" ipv4.method "manual"
 | |
| iptables -F 
 | |
| update-alternatives --set iptables /usr/sbin/iptables-legacy 
 | |
| update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy | 
