packer-cn/website/source/docs/provisioners/puppet-server.html.markdown

73 lines
2.4 KiB
Markdown
Raw Normal View History

2014-01-08 06:46:34 -05:00
---
layout: "docs"
page_title: "Puppet Server Provisioner"
description: |-
The `puppet-server` Packer provisioner provisions Packer machines with Puppet by connecting to a Puppet master.
2014-01-08 06:46:34 -05:00
---
# Puppet Server Provisioner
2014-01-08 06:46:34 -05:00
Type: `puppet-server`
The `puppet-server` Packer provisioner provisions Packer machines with Puppet
2014-02-24 12:51:48 -05:00
by connecting to a Puppet master.
2014-01-08 06:46:34 -05:00
-> **Note:** Puppet will _not_ be installed automatically
by this provisioner. This provisioner expects that Puppet is already
2014-01-08 06:46:34 -05:00
installed on the machine. It is common practice to use the
[shell provisioner](/docs/provisioners/shell.html) before the
2014-01-08 06:46:34 -05:00
Puppet provisioner to do this.
## Basic Example
2014-02-03 15:07:26 -05:00
The example below is fully functional and expects a Puppet server to be accessible
from your network.:
2014-01-08 06:46:34 -05:00
```javascript
2014-01-08 06:46:34 -05:00
{
"type": "puppet-server",
"options": "--test --pluginsync",
"facter": {
"server_role": "webserver"
}
}
```
2014-01-08 06:46:34 -05:00
## Configuration Reference
The reference of available configuration options is listed below.
The provisioner takes various options. None are strictly
required. They are listed below:
* `client_cert_path` (string) - Path to the client certificate for the
node on your disk. This defaults to nothing, in which case a client
cert won't be uploaded.
* `client_private_key_path` (string) - Path to the client private key for
the node on your disk. This defaults to nothing, in which case a client
private key won't be uploaded.
* `facter` (object of key/value strings) - Additional Facter facts to make available to the
2014-01-08 06:46:34 -05:00
Puppet run.
* `options` (string) - Additional command line options to pass
to `puppet agent` when Puppet is ran.
* `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.
2014-01-08 06:46:34 -05:00
* `puppet_node` (string) - The name of the node. If this isn't set,
the fully qualified domain name will be used.
* `puppet_server` (string) - Hostname of the Puppet server. By default
"puppet" will be used.
* `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-server".
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.