Add resources directory with baseline common file/templates
This commit is contained in:
		
							
								
								
									
										9
									
								
								resources/networkd/netdev.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								resources/networkd/netdev.j2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
# ANSIBLE MANAGED FILE - DO NOT EDIT
 | 
			
		||||
[NetDev]
 | 
			
		||||
Name={{ item.0.key }}
 | 
			
		||||
Kind=vlan
 | 
			
		||||
 | 
			
		||||
[VLAN]
 | 
			
		||||
Id={{ item.1 }}
 | 
			
		||||
 | 
			
		||||
# EOF
 | 
			
		||||
							
								
								
									
										27
									
								
								resources/networkd/network.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								resources/networkd/network.j2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
# ANSIBLE MANAGED FILE - DO NOT EDIT
 | 
			
		||||
[Match]
 | 
			
		||||
Name={{ item.key }}
 | 
			
		||||
 | 
			
		||||
[Network]
 | 
			
		||||
DHCP={{ 'Yes' if item.value['dhcp'] | default(false) == true else 'No' }}
 | 
			
		||||
IPv6AcceptRA={{ 'Yes' if item.value['dhcp6'] | default(false) == true else 'No' }}
 | 
			
		||||
{% if item.value['addresses'] is defined %}
 | 
			
		||||
{% for ip_addr in item.value['addresses'] %}
 | 
			
		||||
Address={{ ip_addr }}
 | 
			
		||||
{% endfor %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% if item.value['dns'] is defined %}
 | 
			
		||||
{% for dns_server in item.value['dns'] %}
 | 
			
		||||
DNS={{ dns_server }}
 | 
			
		||||
{% endfor %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% if item.value['gateway'] is defined %}
 | 
			
		||||
Gateway={{ item.value['gateway'] }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% if item.value['vlans'] is defined %}
 | 
			
		||||
{% for vlan_tag in item.value['vlans'] %}
 | 
			
		||||
VLAN={{ item.key }}.{{ vlan_tag }}
 | 
			
		||||
{% endfor %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
# EOF
 | 
			
		||||
		Reference in New Issue
	
	Block a user