» Shared Chef Options

» All Chef Provisioners

The following options are available to all Vagrant Chef provisioners. Many ofthese options are for advanced users only and should not be used unless youunderstand their purpose.

  • binary_path (string) - The path to Chef's bin/ directory on the guestmachine.

  • binary_env (string) - Arbitrary environment variables to set before runningthe Chef provisioner command. This should be of the format KEY=value as astring.

  • install (boolean, string) - Install Chef on the system if it does not exist.The default value is "true", which will use the official Omnibus installerfrom Chef. This is a trinary attribute (it can have three values):

    • true (boolean) - install Chef
    • false (boolean) - do not install Chef
    • "force" (string) - install Chef, even if it is already installed at theproper version on the guest
  • installer_download_path (string) - The path where the Chef installer will bedownloaded to. This option is only honored if the install attribute istrue or "force". The default value is to use the path provided by Chef'sOmnibus installer, which varies between releases. This value has no effect onWindows because Chef's omnibus installer lacks the option on Windows.

  • log_level (string) - The Chef log level. See the Chef docs for acceptablevalues.

  • product (string) - The name of the Chef product to install. The defaultvalue is "chef", which corresponds to the Chef Client. You can also specify"chefdk", which will install the Chef Development Kit. At the time of thiswriting, the ChefDK is only available through the "current" channel, so youwill need to update that value as well.

  • channel (string) - The release channel from which to pull the Chef Clientor the Chef Development Kit. The default value is "stable" which will pullthe latest stable version of the Chef Client. For newer versions, or if youwish to install the Chef Development Kit, you may need to change the channelto "current". Because Chef Software floats the versions that are contained inthe channel, they may change and Vagrant is unable to detect this.

  • version (string) - The version of Chef to install on the guest. If Chef isalready installed on the system, the installed version is compared with therequested version. If they match, no action is taken. If they do not match,the value specified in this attribute will be installed in favor of theexisting version (a message will be displayed).You can also specify "latest" (default), which will install the latestversion of Chef on the system. In this case, Chef will use whateverversion is on the system. To force the newest version of Chef to beinstalled on every provision, set the install option to "force".

  • omnibus_url (string) - Location of Omnibus installation scripts.This URL specifies the location of install.sh/install.ps1 forLinux/Unix and Windows respectively.It defaults to https://omnitruck.chef.io. The full URL is in this case:

» Runner Chef Provisioners

The following options are available to any of the Chef "runner" provisionerswhich include Chef Solo, Chef Zero, and Chef Client.

  • arguments (string) - A list of additional arguments to pass on thecommand-line to Chef. Since these are passed in a shell-like environment,be sure to properly quote and escape characters if necessary. By default,no additional arguments are sent.

  • attempts (int) - The number of times Chef will be run if an error occurs.This defaults to 1. This can be increased to a higher number if your Chefruns take multiple runs to reach convergence.

  • custom_config_path (string) - A path to a custom Chef configuration localon your machine that will be used as the Chef configuration. This Chefconfiguration will be loaded after the Chef configuration that Vagrantgenerates, allowing you to override anything that Vagrant does. This isalso a great way to use new Chef features that may not be supported fullyby Vagrant's abstractions yet.

  • encrypted_data_bag_secret_key_path (string) - The path to the secret keyfile to decrypt encrypted data bags. By default, this is not set.

  • environment (string) - The environment you want the Chef run to bea part of.

  • formatter (string) - The formatter to use for output from Chef.

  • http_proxy, http_proxy_user, http_proxy_pass, no_proxy (string) - Settingsto configure HTTP and HTTPS proxies to use from Chef. These settings arealso available with http replaced with https to configure HTTPS proxies.

  • json (hash) - Custom node attributes to pass into the Chef run.

  • log_level (string) - The log level for Chef output. This defaults to"info".

  • node_name (string) - The node name for the Chef Client. By default thiswill be your hostname.

  • provisioning_path (string) - The path on the remote machine where Vagrantwill store all necessary files for provisioning such as cookbooks, configurations,etc. This path must be world writable. By default this is/tmp/vagrant-chef-# where "#" is replaced by a unique counter.

  • run_list (array) - The run list that will be executed on the node.

  • file_cache_path and file_backup_path (string) - Paths on the remotemachine where files will be cached and backed up. It is useful sometimesto configure this to a synced folder address so that this can be sharedacross many Vagrant runs.

  • verbose_logging (boolean) - Whether or not to enable the Chefverbose_logging option. By default this is false.

  • enable_reporting (boolean) - Whether or not to enable the Chefenable_reporting option. By default this is true.