use wwctl to re-build provision overlays, update to pass overlaynames

This commit is contained in:
Carter Dodd
2022-06-04 11:14:48 -05:00
parent 7caabc439d
commit fc8d3863d8
7 changed files with 83 additions and 68 deletions

View File

@@ -31,14 +31,15 @@ var (
}
BuildHost bool
BuildNodes bool
OverlayName string
OverlayNames []string
OverlayDir string
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&BuildHost, "host", "H", false, "Build overlays only for the host")
baseCmd.PersistentFlags().BoolVarP(&BuildNodes, "nodes", "N", false, "Build overlays only for the nodes")
baseCmd.PersistentFlags().StringVarP(&OverlayName, "overlay", "O", "", "Build only specific overlay")
baseCmd.PersistentFlags().StringSliceVar(&OverlayNames, "overlay", "O", []string{}, "Build only specific overlay(s)")
if err := baseCmd.RegisterFlagCompletionFunc("overlay", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
list, _ := overlay.FindOverlays()
return list, cobra.ShellCompDirectiveNoFileComp