readded configure hostfile command

This commit is contained in:
Christian Goll
2022-06-27 11:50:27 +02:00
parent d976e7fc31
commit ed21052462
6 changed files with 89 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
package hostfile
import (
"github.com/hpcng/warewulf/internal/pkg/configure"
"github.com/spf13/cobra"
)
func CobraRunE(cmd *cobra.Command, args []string) error {
return configure.Hostfile()
}

View File

@@ -0,0 +1,21 @@
package hostfile
import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "hostfile [OPTIONS]",
Short: "update hostfile on master",
Long: "Manage the hostfile on the master node\n",
RunE: CobraRunE,
}
)
func init() {
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}