Added support for a DNSSEARCH netdev tag in network configuration overlays

- Closes: #1256

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-02-11 20:17:40 -07:00
committed by Christian Goll
parent 428b06463f
commit da26fa3061
14 changed files with 314 additions and 244 deletions

View File

@@ -39,8 +39,11 @@ IPV6_FAILURE_FATAL=no
IPV6ADDR="{{ $netdev.Ipaddr6 }}"
{{- end }}
{{- range $tk, $tv := $netdev.Tags }}
{{- if eq (substr 0 3 $tk) "DNS" }}
{{- if regexMatch "^DNS[0-9]*$" $tk }}
{{ $tk }}={{ $tv }}
{{- end }}
{{- end }}
{{- if $netdev.Tags.DNSSEARCH }}
DOMAIN="{{ join " " (without (regexSplit "[ ;]+" $netdev.Tags.DNSSEARCH -1) "") }}"
{{- end }}
{{- end }}