mirror of
https://github.com/rancher/os.git
synced 2025-05-06 15:16:19 +00:00
23 lines
446 B
Go
23 lines
446 B
Go
package debug
|
|
|
|
import (
|
|
"github.com/rancher/os/config"
|
|
"github.com/rancher/os/pkg/log"
|
|
)
|
|
|
|
func PrintAndLoadConfig(_ *config.CloudConfig) (*config.CloudConfig, error) {
|
|
PrintConfig()
|
|
|
|
cfg := config.LoadConfig()
|
|
return cfg, nil
|
|
}
|
|
|
|
func PrintConfig() {
|
|
cfgString, err := config.Export(false, true)
|
|
if err != nil {
|
|
log.WithFields(log.Fields{"err": err}).Error("Error serializing config")
|
|
} else {
|
|
log.Debugf("Config: %s", cfgString)
|
|
}
|
|
}
|