make every script name unique

This commit is contained in:
Megan Marsh 2017-08-22 14:03:28 -07:00
parent df5f946927
commit 5214851463
1 changed files with 2 additions and 3 deletions

View File

@ -21,8 +21,6 @@ import (
"github.com/hashicorp/packer/template/interpolate"
)
const DefaultRemotePath = "c:/Windows/Temp/script.ps1"
var retryableSleep = 2 * time.Second
type Config struct {
@ -137,7 +135,8 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
if p.config.RemotePath == "" {
p.config.RemotePath = DefaultRemotePath
uuid := uuid.TimeOrderedUUID()
p.config.RemotePath = fmt.Sprintf(`c:/Windows/Temp/script-%s.ps1`, uuid)
}
if p.config.Scripts == nil {