Merge pull request #5003 from mitchellh/sethvargo/chef_docs
Improve Chef documentation
This commit is contained in:
commit
d2e1f58683
|
@ -29,9 +29,6 @@ This section lists the complete set of available options for the Chef Apply
|
||||||
provisioner. More detailed examples of how to use the provisioner are
|
provisioner. More detailed examples of how to use the provisioner are
|
||||||
available below this section.
|
available below this section.
|
||||||
|
|
||||||
Due to the unqiue nature of Chef Apply, the Chef Apply provisioner does not
|
|
||||||
inherit the [common options for other Chef provisioners](/v2/provisioning/chef_common.html).
|
|
||||||
|
|
||||||
* `recipe` (string) - The raw recipe contents to execute using Chef Apply on
|
* `recipe` (string) - The raw recipe contents to execute using Chef Apply on
|
||||||
the guest.
|
the guest.
|
||||||
|
|
||||||
|
@ -44,6 +41,9 @@ inherit the [common options for other Chef provisioners](/v2/provisioning/chef_c
|
||||||
`/tmp/vagrant-chef-apply-#` where `#` is a unique counter generated by
|
`/tmp/vagrant-chef-apply-#` where `#` is a unique counter generated by
|
||||||
Vagrant to prevent collisions.
|
Vagrant to prevent collisions.
|
||||||
|
|
||||||
|
In addition to all the options listed above, the Chef Apply provisioner supports
|
||||||
|
the [common options for all Chef provisioners](/v2/provisioning/chef_common.html).
|
||||||
|
|
||||||
## Specifying a Recipe
|
## Specifying a Recipe
|
||||||
|
|
||||||
The easiest way to get started with the Chef Apply provisioner is to just
|
The easiest way to get started with the Chef Apply provisioner is to just
|
||||||
|
|
|
@ -82,12 +82,15 @@ end
|
||||||
|
|
||||||
There are a few more configuration options available. These generally don't
|
There are a few more configuration options available. These generally don't
|
||||||
need to be modified but are available if your Chef Server requires customization
|
need to be modified but are available if your Chef Server requires customization
|
||||||
of these variables:
|
of these variables.
|
||||||
|
|
||||||
* `client_key_path`
|
* `client_key_path`
|
||||||
* `node_name`
|
* `node_name`
|
||||||
* `validation_client_name`
|
* `validation_client_name`
|
||||||
|
|
||||||
|
In addition to all the options listed above, the Chef Client provisioner supports
|
||||||
|
the [common options for all Chef provisioners](/v2/provisioning/chef_common.html).
|
||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
|
|
||||||
When you provision your Vagrant virtual machine with Chef Server, it creates a
|
When you provision your Vagrant virtual machine with Chef Server, it creates a
|
||||||
|
|
|
@ -5,12 +5,50 @@ sidebar_current: "provisioning-chefcommon"
|
||||||
|
|
||||||
# Shared Chef Options
|
# Shared Chef Options
|
||||||
|
|
||||||
This page documents the list of available options that are available in the
|
## All Chef Provisioners
|
||||||
[Chef Solo](/v2/provisioning/chef_solo.html),
|
|
||||||
[Chef Zero](/v2/provisioning/chef_zero.html)
|
The following options are available to all Chef provisioners. Many of these
|
||||||
and
|
options are for advanced users only and should not be used unless you understand
|
||||||
[Chef Client](/v2/provisioning/chef_client.html)
|
their purpose.
|
||||||
provisioners.
|
|
||||||
|
- `binary_path` (string) - The path to Chef's `bin/` directory on the guest
|
||||||
|
machine.
|
||||||
|
|
||||||
|
- `binary_env` (string) - Arbitrary environment variables to set before running
|
||||||
|
the Chef provisioner command. This should be of the format `KEY=value` as a
|
||||||
|
string.
|
||||||
|
|
||||||
|
- `install` (boolean, string) - Install Chef on the system if it does not exist.
|
||||||
|
The default value is "true", which will use the official Omnibus installer
|
||||||
|
from 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 the
|
||||||
|
proper version on the guest
|
||||||
|
|
||||||
|
- `log_level` (string) - The Chef log level. See the Chef docs for acceptable
|
||||||
|
values.
|
||||||
|
|
||||||
|
- `prerelease` (boolean) - Install a prerelease version of Chef. The default
|
||||||
|
value is false.
|
||||||
|
|
||||||
|
- `version` (string) - The version of Chef to install on the guest. If Chef is
|
||||||
|
already installed on the system, the installed version is compared with the
|
||||||
|
requested 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 the
|
||||||
|
existing version (a message will be displayed).
|
||||||
|
|
||||||
|
You can also specify "latest" (default), which will install the latest
|
||||||
|
version of Chef on the system. In this case, Chef will use whatever
|
||||||
|
version is on the system. To force the newest version of Chef to be
|
||||||
|
installed on every provision, set the {#install} option to "force".
|
||||||
|
|
||||||
|
|
||||||
|
## Runner Chef Provisioners
|
||||||
|
|
||||||
|
The following options are available to any of the Chef "runner" provisioners
|
||||||
|
which include [Chef Solo](/v2/provisioning/chef_solo.html), [Chef Zero](/v2/provisioning/chef_zero.html), and [Chef Client](/v2/provisioning/chef_client.html).
|
||||||
|
|
||||||
* `arguments` (string) - A list of additional arguments to pass on the
|
* `arguments` (string) - A list of additional arguments to pass on the
|
||||||
command-line to Chef. Since these are passed in a shell-like environment,
|
command-line to Chef. Since these are passed in a shell-like environment,
|
||||||
|
@ -21,9 +59,6 @@ provisioners.
|
||||||
This defaults to 1. This can be increased to a higher number if your Chef
|
This defaults to 1. This can be increased to a higher number if your Chef
|
||||||
runs take multiple runs to reach convergence.
|
runs take multiple runs to reach convergence.
|
||||||
|
|
||||||
* `binary_path` (string) - The path to the directory of the Chef executable
|
|
||||||
binaries. By default, Vagrant looks for the proper Chef binary on the PATH.
|
|
||||||
|
|
||||||
* `custom_config_path` (string) - A path to a custom Chef configuration local
|
* `custom_config_path` (string) - A path to a custom Chef configuration local
|
||||||
on your machine that will be used as the Chef configuration. This Chef
|
on your machine that will be used as the Chef configuration. This Chef
|
||||||
configuration will be loaded _after_ the Chef configuration that Vagrant
|
configuration will be loaded _after_ the Chef configuration that Vagrant
|
||||||
|
|
|
@ -32,10 +32,6 @@ This section lists the complete set of available options for the Chef Solo
|
||||||
provisioner. More detailed examples of how to use the provisioner are
|
provisioner. More detailed examples of how to use the provisioner are
|
||||||
available below this section.
|
available below this section.
|
||||||
|
|
||||||
Note that only the Chef-solo specific options are shown below. There is
|
|
||||||
also a large set of [common options](/v2/provisioning/chef_common.html)
|
|
||||||
that are available with all Chef provisioners.
|
|
||||||
|
|
||||||
* `cookbooks_path` (string or array) - A list of paths to where cookbooks
|
* `cookbooks_path` (string or array) - A list of paths to where cookbooks
|
||||||
are stored. By default this is "cookbooks", expecting a cookbooks folder
|
are stored. By default this is "cookbooks", expecting a cookbooks folder
|
||||||
relative to the Vagrantfile location.
|
relative to the Vagrantfile location.
|
||||||
|
@ -62,6 +58,9 @@ that are available with all Chef provisioners.
|
||||||
this will use the default synced folder type. For example, you can set this
|
this will use the default synced folder type. For example, you can set this
|
||||||
to "nfs" to use NFS synced folders.
|
to "nfs" to use NFS synced folders.
|
||||||
|
|
||||||
|
In addition to all the options listed above, the Chef Solo provisioner supports
|
||||||
|
the [common options for all Chef provisioners](/v2/provisioning/chef_common.html).
|
||||||
|
|
||||||
## Specifying a Run List
|
## Specifying a Run List
|
||||||
|
|
||||||
The easiest way to get started with the Chef Solo provisioner is to just
|
The easiest way to get started with the Chef Solo provisioner is to just
|
||||||
|
|
|
@ -31,13 +31,12 @@ This section lists the complete set of available options for the Chef Zero
|
||||||
provisioner. More detailed examples of how to use the provisioner are
|
provisioner. More detailed examples of how to use the provisioner are
|
||||||
available below this section.
|
available below this section.
|
||||||
|
|
||||||
Note that only the Chef Zero specific options are shown below, but all [Chef
|
|
||||||
Solo options](/v2/provisioning/chef_solo.html), including the [common Chef
|
|
||||||
provisioner options](/v2/provisioning/chef_common.html), are also inherited.
|
|
||||||
|
|
||||||
* `nodes_path` (string) - A path where the Chef nodes are stored. Be default,
|
* `nodes_path` (string) - A path where the Chef nodes are stored. Be default,
|
||||||
no node path is set.
|
no node path is set.
|
||||||
|
|
||||||
|
In addition to all the options listed above, the Chef Zero provisioner supports
|
||||||
|
the [common options for all Chef provisioners](/v2/provisioning/chef_common.html).
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
The Chef Zero provisioner is configured basically the same way as the Chef Solo
|
The Chef Zero provisioner is configured basically the same way as the Chef Solo
|
||||||
|
|
Loading…
Reference in New Issue