From ca39d23636d0c2e567d4ef7caa5e12ab3da76bff Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 6 Jun 2013 08:42:38 -0700 Subject: [PATCH] builder/vmware: Run the provisioner --- builder/vmware/builder.go | 1 + builder/vmware/step_provision.go | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 builder/vmware/step_provision.go diff --git a/builder/vmware/builder.go b/builder/vmware/builder.go index 260382e63..a11cc3b7b 100644 --- a/builder/vmware/builder.go +++ b/builder/vmware/builder.go @@ -56,6 +56,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact { &stepRun{}, &stepTypeBootCommand{}, &stepWaitForSSH{}, + &stepProvision{}, } // Setup the state bag diff --git a/builder/vmware/step_provision.go b/builder/vmware/step_provision.go new file mode 100644 index 000000000..4f089d937 --- /dev/null +++ b/builder/vmware/step_provision.go @@ -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{}) {}