diff --git a/website/source/docs/provisioners/puppet-masterless.html.markdown b/website/source/docs/provisioners/puppet-masterless.html.markdown new file mode 100644 index 000000000..0535dc538 --- /dev/null +++ b/website/source/docs/provisioners/puppet-masterless.html.markdown @@ -0,0 +1,89 @@ +--- +layout: "docs" +page_title: "Puppet (Masterless) Provisioner" +--- + +# Puppet (Masterless) Provisioner + +Type: `puppet-masterless` + +The masterless Puppet provisioner configures Puppet to run on the machines +by Packer from local modules and manifest files. Modules and manifests +can be uploaded from your local machine to the remote machine or can simply +use remote paths (perhaps obtained using something like the shell provisioner). +Puppet is run in masterless mode, meaning it never communicates to a Puppet +master. + +
+{
+ "type": "puppet-masterless",
+ "manifest_file": "site.pp"
+}
+
+
+## Configuration Reference
+
+The reference of available configuration options is listed below.
+
+Required parameters:
+
+* `manifest_file` (string) - The manifest file for Puppet to use in order
+ to compile and run a catalog. This file must exist on your local system
+ and will be uploaded to the remote machine.
+
+Optional parameters:
+
+* `execute_command` (string) - The command used to execute Puppet. This has
+ various [configuration template variables](/docs/templates/configuration-templates.html)
+ available. See below for more information.
+
+* `module_paths` (array of strings) - This is an array of paths to module
+ directories on your local filesystem. These will be uploaded to the remote
+ machine. By default, this is empty.
+
+* `prevent_sudo` (boolean) - By default, the configured commands that are
+ executed to run Puppet are executed with `sudo`. If this is true,
+ then the sudo will be omitted.
+
+* `staging_directory` (string) - This is the directory where all the configuration
+ of Puppet by Packer will be placed. By default this is "/tmp/packer-puppet-masterless".
+ This directory doesn't need to exist but must have proper permissions so that
+ the SSH user that Packer uses is able to create directories and write into
+ this folder. If the permissions are not correct, use a shell provisioner
+ prior to this to configure it properly.
+
+## Execute Command
+
+By default, Packer uses the following command (broken across multiple lines
+for readability) to execute Puppet:
+
+```
+{{if .Sudo}sudo {{end}}puppet apply \
+ --verbose \
+ --modulepath='{{.ModulePath}}' \
+ {{.ManifestFile}}
+```
+
+This command can be customized using the `execute_command` configuration.
+As you can see from the default value above, the value of this configuration
+can contain various template variables, defined below:
+
+* `ManifestFile` - The path on the remote machine to the manifest file
+ for Puppet to use.
+* `ModulePath` - The paths to the module directories.
+* `Sudo` - A boolean of whether to `sudo` the command or not, depending on
+ the value of the `prevent_sudo` configuration.
+
diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb
index 9de70e6ae..a241c3251 100644
--- a/website/source/layouts/docs.erb
+++ b/website/source/layouts/docs.erb
@@ -43,6 +43,7 @@