Resolve merge conflicts and update documentation.
This commit is contained in:
parent
80ba99c04f
commit
bc2e3de06d
@ -9,11 +9,11 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mitchellh/packer/common"
|
"github.com/hashicorp/packer/common"
|
||||||
"github.com/mitchellh/packer/helper/config"
|
"github.com/hashicorp/packer/helper/config"
|
||||||
"github.com/mitchellh/packer/packer"
|
"github.com/hashicorp/packer/packer"
|
||||||
"github.com/mitchellh/packer/provisioner"
|
"github.com/hashicorp/packer/provisioner"
|
||||||
"github.com/mitchellh/packer/template/interpolate"
|
"github.com/hashicorp/packer/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -7,11 +7,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mitchellh/packer/common"
|
"github.com/hashicorp/packer/common"
|
||||||
"github.com/mitchellh/packer/helper/config"
|
"github.com/hashicorp/packer/helper/config"
|
||||||
"github.com/mitchellh/packer/packer"
|
"github.com/hashicorp/packer/packer"
|
||||||
"github.com/mitchellh/packer/provisioner"
|
"github.com/hashicorp/packer/provisioner"
|
||||||
"github.com/mitchellh/packer/template/interpolate"
|
"github.com/hashicorp/packer/template/interpolate"
|
||||||
)
|
)
|
||||||
|
|
||||||
type guestOSTypeConfig struct {
|
type guestOSTypeConfig struct {
|
||||||
|
@ -105,7 +105,7 @@ multiple manifests you should use `manifest_file` instead.
|
|||||||
|
|
||||||
- `staging_directory` (string) - This is the directory where all the configuration
|
- `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"
|
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
|
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.
|
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
|
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}}
|
{{.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}} &&
|
cd {{.WorkingDir}} &&
|
||||||
|
@ -69,28 +69,52 @@ listed below:
|
|||||||
- `puppet_server` (string) - Hostname of the Puppet server. By default
|
- `puppet_server` (string) - Hostname of the Puppet server. By default
|
||||||
"puppet" will be used.
|
"puppet" will be used.
|
||||||
|
|
||||||
- `staging_dir` (string) - This is the directory where all the configuration
|
- `staging_dir` (string) - This is the directory where all the
|
||||||
of Puppet by Packer will be placed. By default this is "/tmp/packer-puppet-server"
|
configuration of Puppet by Packer will be placed. By default this
|
||||||
when guest_os_type unix and "C:/Windows/Temp/packer-puppet-server" when windows.
|
is /tmp/packer-puppet-server. This directory doesn't need to exist but
|
||||||
This directory doesn't need to exist but must have proper permissions so that
|
must have proper permissions so that the SSH user that Packer uses is able
|
||||||
the SSH user that Packer uses is able to create directories and write into this
|
to create directories and write into this folder. If the permissions are not
|
||||||
folder. If the permissions are not correct, use a shell provisioner prior to this
|
correct, use a shell provisioner prior to this to configure it properly.
|
||||||
to configure it properly.
|
|
||||||
|
|
||||||
- `puppet_bin_dir` (string) - The path to the directory that contains the puppet
|
- `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`
|
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
|
or `%PATH%` environment variable, but some builders (notably, the Docker one) do
|
||||||
not run profile-setup scripts, therefore the path is usually empty.
|
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
|
- `guest_os_type` (string) - The target guest OS type, either "unix" or
|
||||||
"windows". Setting this to "windows" will cause the provisioner to use
|
"windows". Setting this to "windows" will cause the provisioner to use
|
||||||
Windows friendly paths and commands. By default, this is "unix".
|
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
|
## Default Facts
|
||||||
|
|
||||||
In addition to being able to specify custom Facter facts using the `facter`
|
In addition to being able to specify custom Facter facts using the `facter`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user