Resolve merge conflicts and update documentation.

This commit is contained in:
c22 2017-08-15 13:01:24 +10:00
parent 80ba99c04f
commit bc2e3de06d
4 changed files with 48 additions and 24 deletions

View File

@ -9,11 +9,11 @@ import (
"path/filepath"
"strings"
"github.com/mitchellh/packer/common"
"github.com/mitchellh/packer/helper/config"
"github.com/mitchellh/packer/packer"
"github.com/mitchellh/packer/provisioner"
"github.com/mitchellh/packer/template/interpolate"
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/config"
"github.com/hashicorp/packer/packer"
"github.com/hashicorp/packer/provisioner"
"github.com/hashicorp/packer/template/interpolate"
)
type Config struct {

View File

@ -7,11 +7,11 @@ import (
"os"
"strings"
"github.com/mitchellh/packer/common"
"github.com/mitchellh/packer/helper/config"
"github.com/mitchellh/packer/packer"
"github.com/mitchellh/packer/provisioner"
"github.com/mitchellh/packer/template/interpolate"
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/config"
"github.com/hashicorp/packer/packer"
"github.com/hashicorp/packer/provisioner"
"github.com/hashicorp/packer/template/interpolate"
)
type guestOSTypeConfig struct {

View File

@ -105,7 +105,7 @@ multiple manifests you should use `manifest_file` instead.
- `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"
when guest_os_type unix and "C:/Windows/Temp/packer-puppet-masterless" when windows.
when guest OS type is unix and "C:/Windows/Temp/packer-puppet-masterless" when windows.
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
@ -133,7 +133,7 @@ puppet apply --verbose --modulepath='{{.ModulePath}}'
{{.ManifestFile}}
```
The following command is used if guest_os_type is windows:
The following command is used if guest OS type is windows:
```
cd {{.WorkingDir}} &&

View File

@ -69,28 +69,52 @@ listed below:
- `puppet_server` (string) - Hostname of the Puppet server. By default
"puppet" will be used.
- `staging_dir` (string) - This is the directory where all the configuration
of Puppet by Packer will be placed. By default this is "/tmp/packer-puppet-server"
when guest_os_type unix and "C:/Windows/Temp/packer-puppet-server" when windows.
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.
- `staging_dir` (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.
- `puppet_bin_dir` (string) - The path to the directory that contains the puppet
binary for running `puppet agent`. Usually, this would be found via the `$PATH`
or `%PATH%` environment variable, but some builders (notably, the Docker one) do
not run profile-setup scripts, therefore the path is usually empty.
- `execute_command` (string) - This is optional. The command used to execute Puppet. This has
various [configuration template
variables](/docs/templates/configuration-templates.html) available. See
below for more information.
- `guest_os_type` (string) - The target guest OS type, either "unix" or
"windows". Setting this to "windows" will cause the provisioner to use
Windows friendly paths and commands. By default, this is "unix".
- `execute_command` (string) - This is optional. The command used to execute Puppet. This has
various [configuration template variables](/docs/templates/engine.html) available. By default,
Packer uses the following command (broken across multiple lines for readability) to execute Puppet:
```
{{.FacterVars}} {{if .Sudo}}sudo -E {{end}}
{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}puppet agent
--onetime --no-daemonize
{{if ne .PuppetServer ""}}--server='{{.PuppetServer}}' {{end}}
{{if ne .Options ""}}{{.Options}} {{end}}
{{if ne .PuppetNode ""}}--certname={{.PuppetNode}} {{end}}
{{if ne .ClientCertPath ""}}--certdir='{{.ClientCertPath}}' {{end}}
{{if ne .ClientPrivateKeyPath ""}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}
--detailed-exitcodes
```
The following command is used if guest OS type is windows:
```
{{.FacterVars}}
{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}puppet agent
--onetime --no-daemonize
{{if ne .PuppetServer ""}}--server='{{.PuppetServer}}' {{end}}
{{if ne .Options ""}}{{.Options}} {{end}}
{{if ne .PuppetNode ""}}--certname={{.PuppetNode}} {{end}}
{{if ne .ClientCertPath ""}}--certdir='{{.ClientCertPath}}' {{end}}
{{if ne .ClientPrivateKeyPath ""}}--privatekeydir='{{.ClientPrivateKeyPath}}' {{end}}
--detailed-exitcodes
```
## Default Facts
In addition to being able to specify custom Facter facts using the `facter`