Files
warewulf/internal/app/wwctl/configure/ssh/root.go
Jonathon Anderson 65f85a00a3 wwctl completions for no args
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-09 16:13:57 -07:00

28 lines
841 B
Go

package ssh
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "ssh [OPTIONS]",
Short: "Manage and initialize SSH",
Long: "SSH is an optionally dependent service for Warewulf, this tool will automatically\n" +
"setup the ssh keys nodes using the 'default' system overlay as well as user owned\n" +
"keys.",
RunE: CobraRunE,
Args: cobra.NoArgs,
ValidArgsFunction: completions.None,
}
keyTypes []string
)
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
baseCmd.PersistentFlags().StringArrayVarP(&keyTypes, "keytypes", "t", []string{}, "ssh key types to be created")
return baseCmd
}