mirror of
https://github.com/rancher/os.git
synced 2025-09-01 14:48:55 +00:00
Reshuffle cloud-config
Read files cloud-config.d in alphanumeric order, then cloud-config.yml `ros config` writes to cloud-config.yml (and cloud-config.d/private.yml - only private keys) Add (c *CloudConfig) Save() method, use it to save the changed config Read and apply metadata as part of LoadConfig() Simplify ros config export logic
This commit is contained in:
@@ -53,7 +53,7 @@ func disable(c *cli.Context) {
|
||||
}
|
||||
|
||||
if changed {
|
||||
if err = cfg.Set("rancher.services_include", cfg.Rancher.ServicesInclude); err != nil {
|
||||
if err = cfg.Save(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ func del(c *cli.Context) {
|
||||
}
|
||||
|
||||
if changed {
|
||||
if err = cfg.Set("rancher.services_include", cfg.Rancher.ServicesInclude); err != nil {
|
||||
if err = cfg.Save(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ func enable(c *cli.Context) {
|
||||
}
|
||||
|
||||
if changed {
|
||||
if err := cfg.Set("rancher.services_include", cfg.Rancher.ServicesInclude); err != nil {
|
||||
if err := cfg.Save(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user