Add ability to skip chef registration
This change allows a user to skip the bootstrap stage for a machine.
This commit is contained in:
parent
c307dc9557
commit
628743b24c
|
@ -104,6 +104,7 @@ type Provisioner struct {
|
||||||
SecretKey string `mapstructure:"secret_key"`
|
SecretKey string `mapstructure:"secret_key"`
|
||||||
ServerURL string `mapstructure:"server_url"`
|
ServerURL string `mapstructure:"server_url"`
|
||||||
SkipInstall bool `mapstructure:"skip_install"`
|
SkipInstall bool `mapstructure:"skip_install"`
|
||||||
|
SkipRegister bool `mapstructure:"skip_register"`
|
||||||
SSLVerifyMode string `mapstructure:"ssl_verify_mode"`
|
SSLVerifyMode string `mapstructure:"ssl_verify_mode"`
|
||||||
UserName string `mapstructure:"user_name"`
|
UserName string `mapstructure:"user_name"`
|
||||||
UserKey string `mapstructure:"user_key"`
|
UserKey string `mapstructure:"user_key"`
|
||||||
|
@ -213,6 +214,7 @@ func (r *ResourceProvisioner) Apply(
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !p.SkipRegister {
|
||||||
if p.FetchChefCertificates {
|
if p.FetchChefCertificates {
|
||||||
o.Output("Fetch Chef certificates...")
|
o.Output("Fetch Chef certificates...")
|
||||||
if err := p.fetchChefCertificates(o, comm); err != nil {
|
if err := p.fetchChefCertificates(o, comm); err != nil {
|
||||||
|
@ -224,6 +226,7 @@ func (r *ResourceProvisioner) Apply(
|
||||||
if err := p.generateClientKey(o, comm); err != nil {
|
if err := p.generateClientKey(o, comm); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if p.VaultJSON != "" {
|
if p.VaultJSON != "" {
|
||||||
o.Output("Configure Chef vaults...")
|
o.Output("Configure Chef vaults...")
|
||||||
|
|
|
@ -115,6 +115,10 @@ The following arguments are supported:
|
||||||
machine. This assumes Chef Client is already installed when you run the `chef`
|
machine. This assumes Chef Client is already installed when you run the `chef`
|
||||||
provisioner.
|
provisioner.
|
||||||
|
|
||||||
|
* `skip_register (boolean)` - (Optional) Skip the registration of Chef Client on the remote
|
||||||
|
machine. This assumes Chef Client is already registered when you run the `chef`
|
||||||
|
provisioner.
|
||||||
|
|
||||||
* `ssl_verify_mode (string)` - (Optional) Use to set the verify mode for Chef Client HTTPS
|
* `ssl_verify_mode (string)` - (Optional) Use to set the verify mode for Chef Client HTTPS
|
||||||
requests.
|
requests.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue