mirror of
				https://gitlab.sectorq.eu/jaydee/ansible.git
				synced 2025-10-30 18:01:11 +01:00 
			
		
		
		
	init
This commit is contained in:
		
							
								
								
									
										31
									
								
								playbooks/files/scripts/initial_changes.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								playbooks/files/scripts/initial_changes.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| 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 | ||||
		Reference in New Issue
	
	Block a user
	 jaydee
					jaydee