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"`
|
common.PackerConfig `mapstructure:",squash"`
|
||||||
|
|
||||||
// Bootstrapping
|
// Bootstrapping
|
||||||
Bootstrap bool `mapstructure:"bootstrap"`
|
SkipBootstrap bool `mapstructure:"skip_bootstrap"`
|
||||||
Version string `mapstructure:"version"`
|
Version string `mapstructure:"version"`
|
||||||
BootstrapCommand string `mapstructure:"bootstrap_command"`
|
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 {
|
func (p *Provisioner) maybeBootstrap(ui packer.Ui, comm packer.Communicator) error {
|
||||||
if !p.config.Bootstrap {
|
if p.config.SkipBootstrap {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
ui.Message("bootstrapping converge")
|
ui.Message("bootstrapping converge")
|
||||||
|
@ -219,7 +219,7 @@ func (p *Provisioner) applyModules(ui packer.Ui, comm packer.Communicator) error
|
||||||
cmd.Wait()
|
cmd.Wait()
|
||||||
if cmd.ExitStatus == 127 {
|
if cmd.ExitStatus == 127 {
|
||||||
ui.Error("Could not find Converge. Is it installed and in PATH?")
|
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.")
|
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{} {
|
func testConfig() map[string]interface{} {
|
||||||
return map[string]interface{}{
|
return map[string]interface{}{
|
||||||
"bootstrap": false,
|
|
||||||
"version": "",
|
|
||||||
"module_dirs": []map[string]interface{}{
|
"module_dirs": []map[string]interface{}{
|
||||||
{
|
{
|
||||||
"source": "from",
|
"source": "from",
|
||||||
|
|
|
@ -39,9 +39,9 @@ required element is "module". Every other option is optional.
|
||||||
|
|
||||||
Optional parameters:
|
Optional parameters:
|
||||||
|
|
||||||
- `bootstrap` (boolean) - Set to allow the provisioner to download the latest
|
- `skip_bootstrap` (boolean) - If unset or `false`, the provisioner will
|
||||||
Converge bootstrap script and the specified `version` of Converge from the
|
download the latest Converge bootstrap script and the specified `version` of
|
||||||
internet.
|
Converge from the internet.
|
||||||
|
|
||||||
- `version` (string) - Set to a [released Converge version](https://github.com/asteris-llc/converge/releases) for bootstrap.
|
- `version` (string) - Set to a [released Converge version](https://github.com/asteris-llc/converge/releases) for bootstrap.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue