fix: adjust secret store precedence in collect command

This commit is contained in:
Devon Bautista 2025-04-16 16:32:15 -06:00 committed by David Allen
parent 3cdde3bad3
commit 01936cb77b
Signed by: towk
GPG key ID: 0430CDBE22619155

View file

@ -127,6 +127,12 @@ func CollectInventory(assets *[]RemoteAsset, params *CollectParams, store secret
log.Warn().Str("id", config.URI).Msg("username will be blank")
}
// get BMC username to send
bmcCreds, err := bmc.GetBMCCredentials(params.SecretStore, config.URI)
if err != nil {
log.Error().Str("id", config.URI).Msg("username will be blank")
}
// data to be sent to smd
data := map[string]any{
"ID": fmt.Sprintf("%v", node.String()[:len(node.String())-2]),