diff --git a/builtin/provisioners/chef/resource_provisioner.go b/builtin/provisioners/chef/resource_provisioner.go index 68ae6256a4..b44118a44e 100644 --- a/builtin/provisioners/chef/resource_provisioner.go +++ b/builtin/provisioners/chef/resource_provisioner.go @@ -62,6 +62,8 @@ ENV['HTTPS_PROXY'] = "{{ .HTTPSProxy }}" {{ if .NOProxy }}no_proxy "{{ join .NOProxy "," }}"{{ end }} {{ if .SSLVerifyMode }}ssl_verify_mode {{ .SSLVerifyMode }}{{ end }} + +{{ if .DisableReporting }}enable_reporting false{{ end }} ` // Provisioner represents a specificly configured chef provisioner @@ -84,6 +86,7 @@ type Provisioner struct { ServerURL string `mapstructure:"server_url"` SkipInstall bool `mapstructure:"skip_install"` SSLVerifyMode string `mapstructure:"ssl_verify_mode"` + DisableReporting bool `mapstructure:"disable_reporting"` ValidationClientName string `mapstructure:"validation_client_name"` ValidationKey string `mapstructure:"validation_key"` Version string `mapstructure:"version"` diff --git a/website/source/docs/provisioners/chef.html.markdown b/website/source/docs/provisioners/chef.html.markdown index 60f6d577a0..73ba305246 100644 --- a/website/source/docs/provisioners/chef.html.markdown +++ b/website/source/docs/provisioners/chef.html.markdown @@ -98,6 +98,10 @@ The following arguments are supported: * `ssl_verify_mode (string)` - (Optional) Use to set the verify mode for Chef Client HTTPS requests. +* `disable_reporting (boolean)` - (Optional) Use to disable the chef-client data sending to + the Chef server for use with Chef reporting, if flag is omitted default behavior is to send + reporting data. + * `validation_client_name (string)` - (Required) The name of the validation client to use for the initial communication with the Chef Server.