added wwctl genconfig warewulfconf print
Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
19
internal/app/wwctl/genconf/warewulfconf/print/main.go
Normal file
19
internal/app/wwctl/genconf/warewulfconf/print/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package print
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
conf := warewulfconf.New()
|
||||
buffer, err := yaml.Marshal(&conf)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmt.Println(string(buffer))
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user