Fix for network calculation for DHCP

This commit is contained in:
Gregory Kurtzer
2020-12-01 15:19:58 -08:00
parent 26bd57e04f
commit bc2bee9cf0
6 changed files with 62 additions and 57 deletions

View File

@@ -33,8 +33,8 @@ if exists user-class and option user-class = "iPXE" {
}
}
subnet {{.Ipaddr}} netmask {{.Netmask}} {
range {{.RangeStart}} {{.RangeEnd}};
subnet {{$.Network}} netmask {{$.Netmask}} {
range {{$.RangeStart}} {{$.RangeEnd}};
next-server 192.168.1.1;
}

View File

@@ -34,9 +34,9 @@ if exists user-class and option user-class = "iPXE" {
}
{{range .Nodes}}
host {{.Fqdn}} {
hardware ethernet {{.NetDevs.eth0.Hwaddr}}
filed-address {{.NetDevs.eth0.Ipaddr}}
{{- range $nodes := .Nodes}}
host {{$.Fqdn}} {
hardware ethernet {{$nodes.NetDevs.eth0.Hwaddr}}
filed-address {{$nodes.NetDevs.eth0.Ipaddr}}
}
{{end}}