mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-18 08:17:05 +00:00
feat: allow to override standard cloud init paths (#679)
* feat: allow to override standard cloud init paths Signed-off-by: mudler <mudler@localai.io> * Address feedback from review Signed-off-by: mudler <mudler@localai.io> * Address feedback from review Signed-off-by: mudler <mudler@localai.io> --------- Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
parent
c549aeb086
commit
27a124ce6a
9
main.go
9
main.go
@ -667,6 +667,10 @@ The validate command expects a configuration file as its only argument. Local fi
|
|||||||
Name: "cloud-init-paths",
|
Name: "cloud-init-paths",
|
||||||
Usage: "Extra paths to add to the run stage",
|
Usage: "Extra paths to add to the run stage",
|
||||||
},
|
},
|
||||||
|
&cli.StringSliceFlag{
|
||||||
|
Name: "override-cloud-init-paths",
|
||||||
|
Usage: "Override paths to use when running the stage, removing defaults. Supercedes --cloud-init-paths",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Before: func(c *cli.Context) error {
|
Before: func(c *cli.Context) error {
|
||||||
if c.Args().Len() != 1 {
|
if c.Args().Len() != 1 {
|
||||||
@ -685,6 +689,11 @@ The validate command expects a configuration file as its only argument. Local fi
|
|||||||
if len(c.StringSlice("cloud-init-paths")) > 0 {
|
if len(c.StringSlice("cloud-init-paths")) > 0 {
|
||||||
config.CloudInitPaths = append(config.CloudInitPaths, c.StringSlice("cloud-init-paths")...)
|
config.CloudInitPaths = append(config.CloudInitPaths, c.StringSlice("cloud-init-paths")...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(c.StringSlice("override-cloud-init-paths")) > 0 {
|
||||||
|
config.CloudInitPaths = c.StringSlice("override-cloud-init-paths")
|
||||||
|
}
|
||||||
|
|
||||||
if c.Bool("debug") {
|
if c.Bool("debug") {
|
||||||
config.Logger.SetLevel("debug")
|
config.Logger.SetLevel("debug")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user