builder/vmware: Run the provisioner

This commit is contained in:
Mitchell Hashimoto 2013-06-06 08:42:38 -07:00
parent c0e6fbd8ae
commit ca39d23636
2 changed files with 23 additions and 0 deletions

View File

@ -56,6 +56,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact {
&stepRun{},
&stepTypeBootCommand{},
&stepWaitForSSH{},
&stepProvision{},
}
// Setup the state bag

View File

@ -0,0 +1,22 @@
package vmware
import (
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"log"
)
type stepProvision struct{}
func (*stepProvision) Run(state map[string]interface{}) multistep.StepAction {
comm := state["communicator"].(packer.Communicator)
hook := state["hook"].(packer.Hook)
ui := state["ui"].(packer.Ui)
log.Println("Running the provision hook")
hook.Run(packer.HookProvision, ui, comm, nil)
return multistep.ActionContinue
}
func (*stepProvision) Cleanup(map[string]interface{}) {}