Commit a4761087 authored by Jason A. Beranek's avatar Jason A. Beranek

Merge pull request #1514 from briandowns/master

Added struct to be passed to the Process function to render the vagrant ...
parents 5c74cfff dabf34a4
...@@ -125,9 +125,14 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac ...@@ -125,9 +125,14 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
// Write our Vagrantfile // Write our Vagrantfile
var customVagrantfile string var customVagrantfile string
if config.VagrantfileTemplate != "" { if config.VagrantfileTemplate != "" {
vagrantfilePath, err := config.tpl.Process(config.VagrantfileTemplate, nil)
if err != nil {
return nil, false, err
}
ui.Message(fmt.Sprintf( ui.Message(fmt.Sprintf(
"Using custom Vagrantfile: %s", config.VagrantfileTemplate)) "Using custom Vagrantfile: %s", vagrantfilePath))
customBytes, err := ioutil.ReadFile(config.VagrantfileTemplate) customBytes, err := ioutil.ReadFile(vagrantfilePath)
if err != nil { if err != nil {
return nil, false, err return nil, false, err
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment