From 45030e191947928e460b4c737e422904587af426 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Fri, 27 Jan 2017 16:14:31 -0800 Subject: [PATCH] provisioner/anisble: use randomized staging dir --- provisioner/ansible-local/provisioner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/provisioner/ansible-local/provisioner.go b/provisioner/ansible-local/provisioner.go index fa4a8db23..23562ec9a 100644 --- a/provisioner/ansible-local/provisioner.go +++ b/provisioner/ansible-local/provisioner.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/mitchellh/packer/common" + "github.com/mitchellh/packer/common/uuid" "github.com/mitchellh/packer/helper/config" "github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/template/interpolate" @@ -85,7 +86,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { } if p.config.StagingDir == "" { - p.config.StagingDir = DefaultStagingDir + p.config.StagingDir = filepath.Join(DefaultStagingDir, uuid.TimeOrderedUUID()) } // Validation