diff --git a/provisioner/puppet-masterless/provisioner.go b/provisioner/puppet-masterless/provisioner.go index f330d13cf..ba4c73458 100644 --- a/provisioner/puppet-masterless/provisioner.go +++ b/provisioner/puppet-masterless/provisioner.go @@ -97,7 +97,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { if p.config.ExecuteCommand == "" { p.config.ExecuteCommand = "cd {{.WorkingDir}} && " + "{{.FacterVars}} {{if .Sudo}} sudo -E {{end}}" + - "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}{{end}}puppet apply " + + "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}/{{end}}puppet apply " + "--verbose --modulepath='{{.ModulePath}}' " + "{{if ne .HieraConfigPath \"\"}}--hiera_config='{{.HieraConfigPath}}' {{end}}" + "{{if ne .ManifestDir \"\"}}--manifestdir='{{.ManifestDir}}' {{end}}" + diff --git a/provisioner/puppet-server/provisioner.go b/provisioner/puppet-server/provisioner.go index 3d59c19b3..8df37e80f 100644 --- a/provisioner/puppet-server/provisioner.go +++ b/provisioner/puppet-server/provisioner.go @@ -227,7 +227,7 @@ func (p *Provisioner) uploadDirectory(ui packer.Ui, comm packer.Communicator, ds func (p *Provisioner) commandTemplate() string { return "{{.FacterVars}} {{if .Sudo}} sudo -E {{end}}" + - "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}{{end}}puppet agent " + + "{{if ne .PuppetBinDir \"\"}}{{.PuppetBinDir}}/{{end}}puppet agent " + "--onetime --no-daemonize " + "{{if ne .PuppetServer \"\"}}--server='{{.PuppetServer}}' {{end}}" + "{{if ne .Options \"\"}}{{.Options}} {{end}}" +