agent: Disallow bootstrap mode when a client. Fixes #3
This commit is contained in:
parent
bdcbedafa5
commit
fd1d00105e
|
@ -100,6 +100,17 @@ func (c *Command) readConfig() *Config {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only allow bootstrap mode when acting as a server
|
||||||
|
if config.Bootstrap && !config.Server {
|
||||||
|
c.Ui.Error("Bootstrap mode cannot be enabled when server mode is not enabled")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Warn if we are in bootstrap mode
|
||||||
|
if config.Bootstrap {
|
||||||
|
c.Ui.Error("WARNING: Bootstrap mode enabled! Do not enable unless necessary")
|
||||||
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue