Restore functionality of the static dhcp template

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-01-17 15:08:47 -07:00
parent fc1174c114
commit 9569c46210

View File

@@ -54,9 +54,11 @@ subnet {{$.Network}} netmask {{$.Netmask}} {
range {{$.Dhcp.RangeStart}} {{$.Dhcp.RangeEnd}};
next-server {{.Ipaddr}};
}
{{- if eq .Dhcp.Template "static" }}
{{- range $nodes := $.AllNodes}}
{{- range $netname, $netdevs := $nodes.NetDevs}}
host {{$nodes.Id.Get}}-{{$netdevs.Device.Get}}
host {{$nodes.Id.Get}}-{{$netname}}
{
{{- if $netdevs.Primary.GetB}}
{{- if $netdevs.Hwaddr.Defined}}
@@ -70,6 +72,7 @@ host {{$nodes.Id.Get}}-{{$netdevs.Device.Get}}
}
{{end -}}{{/* range NetDevs */}}
{{end -}}{{/* range AllNodes */}}
{{end -}}{{/* if static */}}
{{- else}}
{{abort}}