Use state-based routing instead of sentinel strings, so whitespace-trimming
syntax (e.g. `{{- file "name" -}}`) correctly creates all named files and
symlinks.
Fixes: #2118
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
Co-authored-by: Christian Goll <cgoll@suse.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
10 lines
312 B
Plaintext
10 lines
312 B
Plaintext
{{- range $devname, $netdev := .NetDevs }}
|
|
{{- file (print "route-" $devname ".conf") -}}
|
|
# This file is autogenerated by warewulf
|
|
{{- range $tk, $tv := $netdev.Tags }}
|
|
{{- if eq (substr 0 5 $tk) "route" }}
|
|
{{ index (splitList "," $tv) 0 }} via {{ index (splitList "," $tv) 1 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{ end -}}
|