make every script name unique
This commit is contained in:
parent
df5f946927
commit
5214851463
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue