1
0
mirror of https://github.com/rancher/os.git synced 2025-07-13 06:34:04 +00:00

Merge pull request #877 from joshwget/remove-boot-flag

Remove --boot flag in `ros config export`
This commit is contained in:
Darren Shepherd 2016-04-12 10:01:54 -07:00
commit 56ae343b79
3 changed files with 3 additions and 10 deletions

View File

@ -64,10 +64,6 @@ func configSubcommands() []cli.Command {
Name: "output, o",
Usage: "File to which to save",
},
cli.BoolFlag{
Name: "boot, b",
Usage: "Include cloud-config provided at boot",
},
cli.BoolFlag{
Name: "private, p",
Usage: "Include the generated private keys",
@ -257,7 +253,7 @@ func merge(c *cli.Context) {
}
func export(c *cli.Context) {
content, err := config.Dump(c.Bool("boot"), c.Bool("private"), c.Bool("full"))
content, err := config.Dump(c.Bool("private"), c.Bool("full"))
if err != nil {
log.Fatal(err)
}

View File

@ -102,7 +102,7 @@ func (c *CloudConfig) Merge(values map[interface{}]interface{}) (*CloudConfig, e
return t, nil
}
func Dump(boot, private, full bool) (string, error) {
func Dump(private, full bool) (string, error) {
var cfg *CloudConfig
var err error
@ -113,9 +113,6 @@ func Dump(boot, private, full bool) (string, error) {
if !private {
files = util.FilterStrings(files, func(x string) bool { return x != CloudConfigPrivateFile })
}
if !boot {
files = util.FilterStrings(files, func(x string) bool { return x != CloudConfigBootFile })
}
cfg, err = ChainCfgFuncs(nil,
func(_ *CloudConfig) (*CloudConfig, error) { return ReadConfig(nil, true, files...) },
amendNils,

View File

@ -204,7 +204,7 @@ func RunInit() error {
}
if cfg.Rancher.Debug {
cfgString, err := config.Dump(false, false, true)
cfgString, err := config.Dump(false, true)
if err != nil {
log.WithFields(log.Fields{"err": err}).Error("Error serializing config")
} else {