Merge pull request #1514 from briandowns/master

Added struct to be passed to the Process function to render the vagrant ...
This commit is contained in:
Jason A. Beranek 2014-10-27 16:11:58 -05:00
commit a47610879f
1 changed files with 7 additions and 2 deletions

View File

@ -125,9 +125,14 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
// Write our Vagrantfile
var customVagrantfile string
if config.VagrantfileTemplate != "" {
vagrantfilePath, err := config.tpl.Process(config.VagrantfileTemplate, nil)
if err != nil {
return nil, false, err
}
ui.Message(fmt.Sprintf(
"Using custom Vagrantfile: %s", config.VagrantfileTemplate))
customBytes, err := ioutil.ReadFile(config.VagrantfileTemplate)
"Using custom Vagrantfile: %s", vagrantfilePath))
customBytes, err := ioutil.ReadFile(vagrantfilePath)
if err != nil {
return nil, false, err
}