Skip to content

Commit

Permalink
remove danling "options" and fix class reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tb3088 committed Apr 28, 2018
1 parent 2450e57 commit 422b4a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions provisioner/puppet-masterless/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ type Config struct {

// If true, packer will ignore all exit-codes from a puppet run
IgnoreExitCodes bool `mapstructure:"ignore_exit_codes"`

// The Guest OS Type (unix or windows)
GuestOSType string `mapstructure:"guest_os_type"`
}

type guestOSTypeConfig struct {
Expand Down Expand Up @@ -100,8 +97,8 @@ var guestOSTypeConfigs = map[string]guestOSTypeConfig{
modulePathJoiner: ":",
},
provisioner.WindowsOSType: {
tempDir: path.filepath.ToSlash(os.Getenv("TEMP")),
stagingDir: path.filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-masterless",
tempDir: filepath.ToSlash(os.Getenv("TEMP")),
stagingDir: filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-masterless",
executeCommand: "cd {{.WorkingDir}} && " +
`{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}` +
`{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
Expand Down
6 changes: 3 additions & 3 deletions provisioner/puppet-server/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package puppetserver
import (
"fmt"
"os"
"path/filepath"
"strings"

"github.com/hashicorp/packer/common"
Expand Down Expand Up @@ -89,8 +90,8 @@ var guestOSTypeConfigs = map[string]guestOSTypeConfig{
facterVarsJoiner: " ",
},
provisioner.WindowsOSType: {
tempDir: path.filepath.ToSlash(os.Getenv("TEMP")),
stagingDir: path.filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-server",
tempDir: filepath.ToSlash(os.Getenv("TEMP")),
stagingDir: filepath.ToSlash(os.Getenv("SYSTEMROOT")) + "/Temp/packer-puppet-server",
executeCommand: "cd {{.WorkingDir}} && " +
`{{if ne .FacterVars ""}}{{.FacterVars}} && {{end}}` +
`{{if ne .PuppetBinDir ""}}{{.PuppetBinDir}}/{{end}}` +
Expand Down Expand Up @@ -243,7 +244,6 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
ClientPrivateKeyPath: remoteClientPrivateKeyPath,
PuppetNode: p.config.PuppetNode,
PuppetServer: p.config.PuppetServer,
Options: p.config.Options,
PuppetBinDir: p.config.PuppetBinDir,
Sudo: !p.config.PreventSudo,
WorkingDir: p.config.WorkingDir,
Expand Down

0 comments on commit 422b4a0

Please sign in to comment.