refactor: added flag to set secrets file for crawl

This commit is contained in:
David Allen 2025-03-20 09:11:21 -06:00
parent 41346aebbb
commit 7990ec097d
Signed by: towk
GPG key ID: 793B2924A49B3A3F
2 changed files with 2 additions and 1 deletions

View file

@ -68,6 +68,7 @@ func init() {
CrawlCmd.Flags().StringP("username", "u", "", "Set the username for the BMC")
CrawlCmd.Flags().StringP("password", "p", "", "Set the password for the BMC")
CrawlCmd.Flags().BoolP("insecure", "i", false, "Ignore SSL errors")
CrawlCmd.Flags().StringVarP(&secretsFile, "file", "f", "nodes.json", "set the secrets file with BMC credentials")
checkBindFlagError(viper.BindPFlag("crawl.username", CrawlCmd.Flags().Lookup("username")))
checkBindFlagError(viper.BindPFlag("crawl.password", CrawlCmd.Flags().Lookup("password")))