only add split function in templates

This commit is contained in:
Christian Goll
2022-05-05 16:13:01 +02:00
parent 7ce286ac3e
commit de819b5583
2 changed files with 0 additions and 17 deletions

View File

@@ -26,7 +26,6 @@ type TemplateStruct struct {
AllNodes []node.NodeInfo
BuildHost string
BuildTime string
BuildTimeUnix string
BuildSource string
Ipaddr string
Ipaddr6 string
@@ -37,8 +36,4 @@ type TemplateStruct struct {
Dhcp warewulfconf.DhcpConf
Nfs warewulfconf.NfsConf
Warewulf warewulfconf.WarewulfConf
Overlays []string
Containers []string
Kernels []string
Profiles []string
}

View File

@@ -17,8 +17,6 @@ import (
"text/template"
"time"
"github.com/hpcng/warewulf/internal/pkg/container"
"github.com/hpcng/warewulf/internal/pkg/kernel"
"github.com/hpcng/warewulf/internal/pkg/node"
"github.com/hpcng/warewulf/internal/pkg/util"
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
@@ -302,16 +300,6 @@ func BuildOverlayIndir(nodeInfo node.NodeInfo, overlayNames []string, outputDir
tstruct.BuildHost = hostname
dt := time.Now()
tstruct.BuildTime = dt.Format("01-02-2006 15:04:05 MST")
tstruct.BuildTimeUnix = strconv.FormatInt(dt.Unix(), 10)
tstruct.Containers, _ = container.ListSources()
profiles, _ := nodeDB.FindAllProfiles()
var profileList []string
for _, profile := range profiles {
profileList = append(profileList, profile.Id.Get())
}
tstruct.Profiles = profileList
tstruct.Overlays, _ = FindOverlays()
tstruct.Kernels, _ = kernel.ListKernels()
for _, overlayName := range overlayNames {
wwlog.Printf(wwlog.VERBOSE, "Building overlay %s for node %s in %s\n", overlayName, nodeInfo.Id.Get(), outputDir)
overlaySourceDir := OverlaySourceDir(overlayName)