Define the default staging dir using a const var

This commit is contained in:
Kelsey Hightower 2013-09-29 15:42:42 -07:00
parent 365f356a0b
commit 4d241b96c1
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,8 @@ import (
"path/filepath"
)
const DefaultStagingDir = "/tmp/packer-provisioner-ansible-local"
type Config struct {
common.PackerConfig `mapstructure:",squash"`
tpl *packer.ConfigTemplate
@ -47,7 +49,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
errs := common.CheckUnusedConfig(md)
if p.config.StagingDir == "" {
p.config.StagingDir = "/tmp/packer-provisioner-ansible-local"
p.config.StagingDir = DefaultStagingDir
}
// Templates