remove danling "options" and fix class reference
This commit is contained in:
parent
2450e57fbe
commit
422b4a073e
@ -65,9 +65,6 @@ type Config struct {
|
|||||||
|
|
||||||
// If true, packer will ignore all exit-codes from a puppet run
|
// If true, packer will ignore all exit-codes from a puppet run
|
||||||
IgnoreExitCodes bool `mapstructure:"ignore_exit_codes"`
|
IgnoreExitCodes bool `mapstructure:"ignore_exit_codes"`
|
||||||
|
|
||||||
// The Guest OS Type (unix or windows)
|
|
||||||
GuestOSType string `mapstructure:"guest_os_type"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type guestOSTypeConfig struct {
|
type guestOSTypeConfig struct {
|
||||||
@ -100,8 +97,8 @@ var guestOSTypeConfigs = map[string]guestOSTypeConfig{
|
|||||||
modulePathJoiner: ":",
|
modulePathJoiner: ":",
|
||||||
},
|
},
|
||||||
provisioner.WindowsOSType: {
|
provisioner.WindowsOSType: {
|
||||||
tempDir: path.filepath.ToSlash(os.Getenv("TEMP")),
|
tempDir: filepath.ToSlash(os.Getenv("TEMP")),
|
||||||
stagingDir: path.filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-masterless",
|
stagingDir: filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-masterless",
|
||||||
executeCommand: "cd {{.WorkingDir}} && " +
|
executeCommand: "cd {{.WorkingDir}} && " +
|
||||||
`{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}` +
|
`{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}` +
|
||||||
`{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
|
`{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
|
||||||
|
@ -5,6 +5,7 @@ package puppetserver
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/common"
|
"github.com/hashicorp/packer/common"
|
||||||
@ -89,8 +90,8 @@ var guestOSTypeConfigs = map[string]guestOSTypeConfig{
|
|||||||
facterVarsJoiner: " ",
|
facterVarsJoiner: " ",
|
||||||
},
|
},
|
||||||
provisioner.WindowsOSType: {
|
provisioner.WindowsOSType: {
|
||||||
tempDir: path.filepath.ToSlash(os.Getenv("TEMP")),
|
tempDir: filepath.ToSlash(os.Getenv("TEMP")),
|
||||||
stagingDir: path.filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-server",
|
stagingDir: filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-server",
|
||||||
executeCommand: "cd {{.WorkingDir}} && " +
|
executeCommand: "cd {{.WorkingDir}} && " +
|
||||||
`{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}` +
|
`{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}` +
|
||||||
`{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
|
`{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
|
||||||
@ -243,7 +244,6 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||||||
ClientPrivateKeyPath: remoteClientPrivateKeyPath,
|
ClientPrivateKeyPath: remoteClientPrivateKeyPath,
|
||||||
PuppetNode: p.config.PuppetNode,
|
PuppetNode: p.config.PuppetNode,
|
||||||
PuppetServer: p.config.PuppetServer,
|
PuppetServer: p.config.PuppetServer,
|
||||||
Options: p.config.Options,
|
|
||||||
PuppetBinDir: p.config.PuppetBinDir,
|
PuppetBinDir: p.config.PuppetBinDir,
|
||||||
Sudo: !p.config.PreventSudo,
|
Sudo: !p.config.PreventSudo,
|
||||||
WorkingDir: p.config.WorkingDir,
|
WorkingDir: p.config.WorkingDir,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user