builder/amazonebs: Add provisioning step

This commit is contained in:
Mitchell Hashimoto 2013-05-23 22:47:59 -07:00
parent d00abbd5ce
commit 35a947e304
2 changed files with 23 additions and 0 deletions

View File

@ -72,6 +72,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact {
steps := []Step{
&stepKeyPair{},
&stepRunSourceInstance{},
&stepConnectSSH{},
&stepProvision{},
&stepStopInstance{},
&stepCreateAMI{},
}

View File

@ -0,0 +1,21 @@
package amazonebs
import (
"github.com/mitchellh/packer/packer"
"log"
)
type stepProvision struct{}
func (*stepProvision) Run(state map[string]interface{}) 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 StepContinue
}
func (*stepProvision) Cleanup(map[string]interface{}) {}