kube-forge v2: embede python with ansible (kubespray) and cobra as cli building tool
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"embed"
|
||||
"kube-forge/internal/config"
|
||||
"kube-forge/internal/logging"
|
||||
"kube-forge/internal/resources"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -37,7 +38,13 @@ func applyTemplates(templates [][2]string) {
|
||||
config := config.GetConfig()
|
||||
for _, templateData := range templates {
|
||||
var templateFile = templateData[0]
|
||||
var outFile = filepath.Join(config.WorkDir, templateData[1])
|
||||
var outFile = filepath.Join(config.BaseDir, templateData[1])
|
||||
|
||||
dir := filepath.Dir(outFile)
|
||||
err := os.MkdirAll(dir, 0755)
|
||||
if err != nil {
|
||||
logging.Log.Fatal(err)
|
||||
}
|
||||
|
||||
tmpl := getTemplateFromEmbedFSFolder(resources.Templates, templateFile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user