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:
committed by
Christian Goll
parent
428b06463f
commit
da26fa3061
@@ -50,7 +50,7 @@ gateway={{ $netdev.Gateway }}
|
||||
{{- end }}
|
||||
{{- $dns := "" }}
|
||||
{{- range $tk, $tv := $netdev.Tags }}
|
||||
{{- if eq (substr 0 3 $tk) "DNS" }}
|
||||
{{- if regexMatch "^DNS[0-9]*$" $tk }}
|
||||
{{- $dns = print $dns $tv ";" }}
|
||||
{{- else if eq (substr 0 5 $tk) "route" }}
|
||||
{{$tk}}={{$tv}}
|
||||
@@ -59,6 +59,9 @@ gateway={{ $netdev.Gateway }}
|
||||
{{- if $dns }}
|
||||
dns={{$dns}}
|
||||
{{- end }}
|
||||
{{- if $netdev.Tags.DNSSEARCH }}
|
||||
dns-search={{ join ";" (without (regexSplit "[ ;]+" $netdev.Tags.DNSSEARCH -1) "") }};
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if eq $netdev.Type "vlan" }}
|
||||
|
||||
Reference in New Issue
Block a user