Add Id and Cluster to the available variables for template substitution.

This commit is contained in:
griznog
2021-11-23 10:44:35 -06:00
parent 3912f5da98
commit bd5218a7c7

View File

@@ -18,6 +18,8 @@ type iPxeTemplate struct {
WaitTime string
Hostname string
Fqdn string
Id string
Cluster string
ContainerName string
Hwaddr string
Ipaddr string
@@ -129,6 +131,8 @@ func IpxeSend(w http.ResponseWriter, req *http.Request) {
var replace iPxeTemplate
replace.Id = nodeobj.Id.Get()
replace.Cluster = nodeobj.Cluster.Get()
replace.Fqdn = nodeobj.Id.Get()
replace.Ipaddr = conf.Ipaddr
replace.Port = strconv.Itoa(conf.Warewulf.Port)