provisioner(converge): change bootstrap to skip_bootstrap
This commit is contained in:
parent
5d935767f0
commit
18425c45d0
|
@ -27,7 +27,7 @@ type Config struct {
|
|||
common.PackerConfig `mapstructure:",squash"`
|
||||
|
||||
// Bootstrapping
|
||||
Bootstrap bool `mapstructure:"bootstrap"`
|
||||
SkipBootstrap bool `mapstructure:"skip_bootstrap"`
|
||||
Version string `mapstructure:"version"`
|
||||
BootstrapCommand string `mapstructure:"bootstrap_command"`
|
||||
|
||||
|
@ -135,7 +135,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
}
|
||||
|
||||
func (p *Provisioner) maybeBootstrap(ui packer.Ui, comm packer.Communicator) error {
|
||||
if !p.config.Bootstrap {
|
||||
if p.config.SkipBootstrap {
|
||||
return nil
|
||||
}
|
||||
ui.Message("bootstrapping converge")
|
||||
|
@ -219,7 +219,7 @@ func (p *Provisioner) applyModules(ui packer.Ui, comm packer.Communicator) error
|
|||
cmd.Wait()
|
||||
if cmd.ExitStatus == 127 {
|
||||
ui.Error("Could not find Converge. Is it installed and in PATH?")
|
||||
if !p.config.Bootstrap {
|
||||
if p.config.SkipBootstrap {
|
||||
ui.Error("Bootstrapping was disabled for this run. That might be why Converge isn't present.")
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ import (
|
|||
|
||||
func testConfig() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"bootstrap": false,
|
||||
"version": "",
|
||||
"module_dirs": []map[string]interface{}{
|
||||
{
|
||||
"source": "from",
|
||||
|
|
|
@ -39,9 +39,9 @@ required element is "module". Every other option is optional.
|
|||
|
||||
Optional parameters:
|
||||
|
||||
- `bootstrap` (boolean) - Set to allow the provisioner to download the latest
|
||||
Converge bootstrap script and the specified `version` of Converge from the
|
||||
internet.
|
||||
- `skip_bootstrap` (boolean) - If unset or `false`, the provisioner will
|
||||
download the latest Converge bootstrap script and the specified `version` of
|
||||
Converge from the internet.
|
||||
|
||||
- `version` (string) - Set to a [released Converge version](https://github.com/asteris-llc/converge/releases) for bootstrap.
|
||||
|
||||
|
|
Loading…
Reference in New Issue