Update network interface bonding configuration and documentation
- Closes: #1482 - Closes: #1280 This also corrects poor handling of whitespace around the "file" function throughout the templates, given experiences with the network templates while implementing the bond behavior. Since the file function actually does produce output (that is parsed by Warewulf itself) it should not collaps prefix whitespace. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
{{- range $devname, $netdev := .NetDevs }}
|
||||
{{- $filename := print "ifcfg-" $devname ".conf" }}
|
||||
{{- file $filename }}
|
||||
{{ file (print "ifcfg-" $devname ".conf") }}
|
||||
# This file is autogenerated by warewulf
|
||||
|
||||
{{ if eq $netdev.Type "vlan" -}}
|
||||
{{- if eq $netdev.Type "vlan" }}
|
||||
VLAN=yes
|
||||
{{- else -}}
|
||||
TYPE={{ default "ethernet" $netdev.Type }}
|
||||
{{- else }}
|
||||
TYPE={{ default "Ethernet" $netdev.Type }}
|
||||
{{- end }}
|
||||
{{- if $netdev.Tags.master }}
|
||||
MASTER={{ $netdev.Tags.master }}
|
||||
{{- end }}
|
||||
DEVICE={{ $netdev.Device }}
|
||||
NAME={{ $devname }}
|
||||
@@ -42,4 +43,4 @@ IPV6ADDR="{{ $netdev.Ipaddr6 }}"
|
||||
{{ $tk }}={{ $tv }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end -}}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{{- range $devname, $netdev := .NetDevs }}
|
||||
{{- $filename := print "route-" $devname ".conf" }}
|
||||
{{- file $filename }}
|
||||
{{ file (print "route-" $devname ".conf") }}
|
||||
# This file is autogenerated by warewulf
|
||||
{{- range $tk, $tv := $netdev.Tags }}
|
||||
{{- if eq (substr 0 5 $tk) "route" }}
|
||||
|
||||
Reference in New Issue
Block a user