builder/virtualbox: provision step

pull/15/head
Mitchell Hashimoto 13 years ago
parent c58d5ab3af
commit 574286bdd6

@ -182,6 +182,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) packer
new(stepRun),
new(stepTypeBootCommand),
new(stepWaitForSSH),
new(stepProvision),
}
// Setup the state bag

@ -0,0 +1,22 @@
package virtualbox
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{}) {}
Loading…
Cancel
Save