From 6bfee513891bf5ef12af074da13a19ebc9ea62a3 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sat, 30 May 2015 21:17:28 -0700 Subject: [PATCH] Update CHANGELOG and docs for Puppet 4 environments support --- CHANGELOG.md | 1 + .../v2/provisioning/puppet_apply.html.md | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f91db5e3e..12a198389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ IMPROVEMENTS: - guests/photon: Initial support [GH-5612] - guests/solaris,solaris11: Support inserting generated key. [GH-5182] [GH-5290] + - provisioners/puppet: add support for Puppet 4 and configuration options [GH-5601] - provisioners/salt: add configurable `config_dir` [GH-3138] - provisioners/salt: add support for masterless configuration [GH-3235] - provisioners/salt: provider path to missing file in errors [GH-5637] diff --git a/website/docs/source/v2/provisioning/puppet_apply.html.md b/website/docs/source/v2/provisioning/puppet_apply.html.md index b033bcd5e..9d9e5726d 100644 --- a/website/docs/source/v2/provisioning/puppet_apply.html.md +++ b/website/docs/source/v2/provisioning/puppet_apply.html.md @@ -26,6 +26,8 @@ This section lists the complete set of available options for the Puppet provisioner. More detailed examples of how to use the provisioner are available below this section. +* `binary_path` (string) - Path on the guest to Puppet's `bin/` directory. + * `facter` (hash) - A hash of data to set as available facter variables within the Puppet run. @@ -43,6 +45,11 @@ available below this section. * `module_path` (string) - Path, on the host, to the directory which contains Puppet modules, if any. +* `environment` (string) - Name of the Puppet environment. + +* `environment_path` (string) - Path to the directory that contains environment + files on the host disk. + * `options` (array of strings) - Additionally options to pass to the Puppet executable when running Puppet. @@ -59,6 +66,13 @@ available below this section. directory when Puppet is executed. This is usually only set because relative paths are used in the Hiera configuration. +~> If only `environment` and `environments_path` are specified, it will parse +and use the manifest specified in the `environment.conf` file. If +`manifests_path` and `manifest_file` is specified along with the environment +options, the manifest from the environment will be overridden by the specified `manifest_file`. If `manifests_path` and `manifest_file` are specified without +environments, the old non-environment mode will be used (which will fail on +Puppet 4+). + ## Bare Minimum The quickest way to get started with the Puppet provisioner is to just @@ -120,6 +134,20 @@ end It is a somewhat odd syntax, but the tuple (two-element array) says that the path is located in the "vm" at "/path/to/manifests". +## Environments + +If you are using Puppet 4 or higher, you can also specify the name of the +Puppet environment and the path on the local disk to the environment files: + +```ruby +Vagrant.configure("2") do |config| + config.vm.provision "puppet" do |puppet| + puppet.environment_path = "../puppet/environments" + puppet.environment = "testenv" + end +end +``` + ## Modules Vagrant also supports provisioning with [Puppet modules](http://docs.puppetlabs.com/guides/modules.html).