Move raw_exec enabled into the DevMode config block

This commit is contained in:
Chris Bednarski
2015-12-10 15:24:21 -08:00
parent 1821db757b
commit 5bf8a1fff6
2 changed files with 3 additions and 5 deletions

View File

@@ -44,11 +44,6 @@ func (d *RawExecDriver) Fingerprint(cfg *config.Config, node *structs.Node) (boo
// Check that the user has explicitly enabled this executor.
enabled := cfg.ReadBoolDefault(rawExecConfigOption, false)
// Always turn this driver on in dev mode because we don't have a config file
if cfg.DevMode {
enabled = true
}
if enabled {
d.logger.Printf("[WARN] driver.raw_exec: raw exec is enabled. Only enable if needed")
node.Attributes["driver.raw_exec"] = "1"

View File

@@ -257,6 +257,9 @@ func DevConfig() *Config {
} else if runtime.GOOS == "linux" {
conf.Client.NetworkInterface = "lo"
}
conf.Client.Options = map[string]string{
"driver.raw_exec.enable": "true",
}
return conf
}