use list of resources in profiles/nodes
access the resource not at node or profile level but in the templates as global variable Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
5ff27061a3
commit
07c77a63d5
@@ -37,6 +37,7 @@ type TemplateStruct struct {
|
||||
Tftp warewulfconf.TFTPConf
|
||||
Paths warewulfconf.BuildConfig
|
||||
AllNodes []node.Node
|
||||
Resource map[string]node.RemoteRes
|
||||
node.Node
|
||||
// backward compatiblity
|
||||
Container string
|
||||
@@ -80,7 +81,8 @@ func InitStruct(overlayName string, nodeData node.Node, allNodes []node.Node) (T
|
||||
dt := time.Now()
|
||||
tstruct.BuildTime = dt.Format("01-02-2006 15:04:05 MST")
|
||||
tstruct.BuildTimeUnix = strconv.FormatInt(dt.Unix(), 10)
|
||||
tstruct.Node.Tags = map[string]string{}
|
||||
// tstruct.Node.Tags = map[string]string{}
|
||||
tstruct.Resource = nodeDB.Resource
|
||||
var buf bytes.Buffer
|
||||
enc := gob.NewEncoder(&buf)
|
||||
dec := gob.NewDecoder(&buf)
|
||||
|
||||
Reference in New Issue
Block a user