[interfaces] Add supplementary lines from local facts to all interfaces
							parent
							
								
									210fc18a98
								
							
						
					
					
						commit
						32e24ff38a
					
				| 
						 | 
					@ -11,9 +11,27 @@ iface {{ srv_iface.stdout }} inet static
 | 
				
			||||||
	dns-nameservers {{ srv_dns }}
 | 
						dns-nameservers {{ srv_dns }}
 | 
				
			||||||
	dns-search crans.org
 | 
						dns-search crans.org
 | 
				
			||||||
	up /sbin/ip link set $IFACE alias srv
 | 
						up /sbin/ip link set $IFACE alias srv
 | 
				
			||||||
 | 
					{% if 'interfaces' in ansible_local %}
 | 
				
			||||||
 | 
					{% if srv_iface.stdout in ansible_local.interfaces %}
 | 
				
			||||||
 | 
					{% if 'sup_if_4' in ansible_local.interfaces[srv_iface.stdout] %}
 | 
				
			||||||
 | 
					{% for line in ansible_local.interfaces[srv_iface.stdout].sup_if_4 %}
 | 
				
			||||||
 | 
					        {{ line }}
 | 
				
			||||||
 | 
					{% endfor %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
iface {{ srv_iface.stdout }} inet6 static
 | 
					iface {{ srv_iface.stdout }} inet6 static
 | 
				
			||||||
	address {{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv6[0].prefix }}
 | 
						address {{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv6[0].prefix }}
 | 
				
			||||||
	autoconf 1
 | 
						autoconf 1
 | 
				
			||||||
	accept_ra 2
 | 
						accept_ra 2
 | 
				
			||||||
	up /sbin/sysctl net/ipv6/conf/$IFACE/accept_ra_defrtr=1
 | 
						up /sbin/sysctl net/ipv6/conf/$IFACE/accept_ra_defrtr=1
 | 
				
			||||||
 | 
					{% if 'interfaces' in ansible_local %}
 | 
				
			||||||
 | 
					{% if srv_iface.stdout in ansible_local.interfaces %}
 | 
				
			||||||
 | 
					{% if 'sup_if_6' in ansible_local.interfaces[srv_iface.stdout] %}
 | 
				
			||||||
 | 
					{% for line in ansible_local.interfaces[srv_iface.stdout].sup_if_6 %}
 | 
				
			||||||
 | 
						{{ line }}
 | 
				
			||||||
 | 
					{% endfor %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,3 +26,12 @@ iface {{ ens_iface.stdout }} inet6 static
 | 
				
			||||||
	autoconf 1
 | 
						autoconf 1
 | 
				
			||||||
	accept_ra 2
 | 
						accept_ra 2
 | 
				
			||||||
	up /sbin/sysctl net/ipv6/conf/$IFACE/accept_ra_defrtr=1
 | 
						up /sbin/sysctl net/ipv6/conf/$IFACE/accept_ra_defrtr=1
 | 
				
			||||||
 | 
					{% if 'interfaces' in ansible_local %}
 | 
				
			||||||
 | 
					{% if ens_iface.stdout in ansible_local.interfaces %}
 | 
				
			||||||
 | 
					{% if 'sup_if_6' in ansible_local.interfaces[ens_iface.stdout] %}
 | 
				
			||||||
 | 
					{% for line in ansible_local.interfaces[ens_iface.stdout].sup_if_6 %}
 | 
				
			||||||
 | 
						{{ line }}
 | 
				
			||||||
 | 
					{% endfor %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,24 @@ iface {{ adm_iface.stdout }} inet static
 | 
				
			||||||
	dns-nameservers {{ adm_dns }}
 | 
						dns-nameservers {{ adm_dns }}
 | 
				
			||||||
	dns-search adm.crans.org
 | 
						dns-search adm.crans.org
 | 
				
			||||||
	up /sbin/ip link set $IFACE alias adm
 | 
						up /sbin/ip link set $IFACE alias adm
 | 
				
			||||||
 | 
					{% if 'interfaces' in ansible_local %}
 | 
				
			||||||
 | 
					{% if adm_iface.stdout in ansible_local.interfaces %}
 | 
				
			||||||
 | 
					{% if 'sup_if_4' in ansible_local.interfaces[adm_iface.stdout] %}
 | 
				
			||||||
 | 
					{% for line in ansible_local.interfaces[adm_iface.stdout].sup_if_4 %}
 | 
				
			||||||
 | 
						{{ line }}
 | 
				
			||||||
 | 
					{% endfor %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
iface {{ adm_iface.stdout }} inet6 static
 | 
					iface {{ adm_iface.stdout }} inet6 static
 | 
				
			||||||
	address {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv6[0].prefix }}
 | 
						address {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv6[0].prefix }}
 | 
				
			||||||
 | 
					{% if 'interfaces' in ansible_local %}
 | 
				
			||||||
 | 
					{% if adm_iface.stdout in ansible_local.interfaces %}
 | 
				
			||||||
 | 
					{% if 'sup_if_6' in ansible_local.interfaces[adm_iface.stdout] %}
 | 
				
			||||||
 | 
					{% for line in ansible_local.interfaces[adm_iface.stdout].sup_if_6 %}
 | 
				
			||||||
 | 
						{{ line }}
 | 
				
			||||||
 | 
					{% endfor %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue