use box_name instead of source_path when generating vagrant file
This commit is contained in:
parent
5478f16e19
commit
4a9d42b78f
|
@ -199,7 +199,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
|
|||
&StepCreateVagrantfile{
|
||||
Template: b.config.Template,
|
||||
SyncedFolder: b.config.SyncedFolder,
|
||||
SourceBox: b.config.SourceBox,
|
||||
BoxName: b.config.BoxName,
|
||||
OutputDir: b.config.OutputDir,
|
||||
GlobalID: b.config.GlobalID,
|
||||
},
|
||||
|
|
|
@ -14,10 +14,10 @@ import (
|
|||
|
||||
type StepCreateVagrantfile struct {
|
||||
Template string
|
||||
SourceBox string
|
||||
OutputDir string
|
||||
SyncedFolder string
|
||||
GlobalID string
|
||||
BoxName string
|
||||
}
|
||||
|
||||
var DEFAULT_TEMPLATE = `Vagrant.configure("2") do |config|
|
||||
|
@ -56,7 +56,7 @@ func (s *StepCreateVagrantfile) createVagrantfile() (string, error) {
|
|||
|
||||
opts := &VagrantfileOptions{
|
||||
SyncedFolder: s.SyncedFolder,
|
||||
BoxName: s.SourceBox,
|
||||
BoxName: s.BoxName,
|
||||
}
|
||||
|
||||
err = tpl.Execute(templateFile, opts)
|
||||
|
|
Loading…
Reference in New Issue