fabric: consolidate interface templates
Mostly to avoid special‐casing bond interfaces, and to support BGP connections over virtual interfaces.
This commit is contained in:
		
							parent
							
								
									5381fecaa4
								
							
						
					
					
						commit
						ce7c1bd49e
					
				
					 6 changed files with 28 additions and 40 deletions
				
			
		| 
						 | 
				
			
			@ -42,8 +42,8 @@
 | 
			
		|||
 | 
			
		||||
- name: Set up peerlink
 | 
			
		||||
  template:
 | 
			
		||||
    dest: "/etc/network/interfaces.d/bond.intf"
 | 
			
		||||
    src: "bond.intf.j2"
 | 
			
		||||
    dest: "/etc/network/interfaces.d/peerlink.intf"
 | 
			
		||||
    src: "peerlink.intf.j2"
 | 
			
		||||
    mode: 0644
 | 
			
		||||
  notify: reload interfaces
 | 
			
		||||
  when: "peer is defined"
 | 
			
		||||
| 
						 | 
				
			
			@ -56,14 +56,6 @@
 | 
			
		|||
  notify: reload interfaces
 | 
			
		||||
  when: "'bridge' in interfaces | map(attribute='name')"
 | 
			
		||||
 | 
			
		||||
- name: Set up bonds
 | 
			
		||||
  template:
 | 
			
		||||
    dest: "/etc/network/interfaces.d/bond.intf"
 | 
			
		||||
    src: "bond.intf.j2"
 | 
			
		||||
    mode: 0644
 | 
			
		||||
  notify: reload interfaces
 | 
			
		||||
  when: "'lag' in interfaces | map(attribute='type.value')"
 | 
			
		||||
 | 
			
		||||
- name: Set nameservers for mgmt VRF
 | 
			
		||||
  template:
 | 
			
		||||
    dest: /etc/resolv.conf
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue