mirror of
https://github.com/rancher/os.git
synced 2025-06-30 16:51:47 +00:00
Merge pull request #1440 from joshwget/metadata-config-export
Show SSH keys and hostname from metadata in 'ros config export'
This commit is contained in:
commit
2bcc69b59a
@ -18,7 +18,7 @@ func Merge(bytes []byte) error {
|
||||
}
|
||||
|
||||
func Export(private, full bool) (string, error) {
|
||||
rawCfg := loadRawDiskConfig("", full)
|
||||
rawCfg := loadRawConfig("", full)
|
||||
if !private {
|
||||
rawCfg = filterPrivateKeys(rawCfg)
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ func loadRawDiskConfig(dirPrefix string, full bool) map[interface{}]interface{}
|
||||
return util.Merge(rawCfg, additionalCfgs)
|
||||
}
|
||||
|
||||
func loadRawConfig(dirPrefix string) map[interface{}]interface{} {
|
||||
rawCfg := loadRawDiskConfig(dirPrefix, true)
|
||||
func loadRawConfig(dirPrefix string, full bool) map[interface{}]interface{} {
|
||||
rawCfg := loadRawDiskConfig(dirPrefix, full)
|
||||
rawCfg = util.Merge(rawCfg, readCmdline())
|
||||
rawCfg = applyDebugFlags(rawCfg)
|
||||
return mergeMetadata(rawCfg, readMetadata())
|
||||
@ -56,7 +56,7 @@ func LoadConfig() *CloudConfig {
|
||||
}
|
||||
|
||||
func LoadConfigWithPrefix(dirPrefix string) *CloudConfig {
|
||||
rawCfg := loadRawConfig(dirPrefix)
|
||||
rawCfg := loadRawConfig(dirPrefix, true)
|
||||
|
||||
cfg := &CloudConfig{}
|
||||
if err := util.Convert(rawCfg, cfg); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user