provisioner(converge): change bootstrap to skip_bootstrap

This commit is contained in:
Brian Hicks 2016-12-28 08:48:02 -06:00
parent 5d935767f0
commit 18425c45d0
No known key found for this signature in database
GPG Key ID: FF1F407C0D3C2430
3 changed files with 6 additions and 8 deletions

View File

@ -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.")
}

View File

@ -9,8 +9,6 @@ import (
func testConfig() map[string]interface{} {
return map[string]interface{}{
"bootstrap": false,
"version": "",
"module_dirs": []map[string]interface{}{
{
"source": "from",

View File

@ -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.