builder/amazon/chroot: rename to builder-amazon-chroot

This commit is contained in:
Mitchell Hashimoto 2013-07-29 17:07:05 -07:00
parent c6fde36b5e
commit b329323bb2
4 changed files with 20 additions and 1 deletions

View File

@ -69,7 +69,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state["ui"] = ui
// Build the steps
steps := []multistep.Step{}
steps := []multistep.Step{
&StepCheckEC2{},
}
// Run!
if b.config.PackerDebug {

View File

@ -0,0 +1,16 @@
package chroot
import (
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
)
type StepCheckEC2 struct{}
func (s *StepCheckEC2) Run(state map[string]interface{}) multistep.StepAction {
ui := state["ui"].(packer.Ui)
ui.Say("Verifying we're on an EC2 instance...")
return multistep.ActionContinue
}
func (s *StepCheckEC2) Cleanup(map[string]interface{}) {}

View File

@ -20,6 +20,7 @@ const defaultConfig = `
"builders": {
"amazon-ebs": "packer-builder-amazon-ebs",
"amazon-chroot": "packer-builder-amazon-chroot",
"amazon-instance": "packer-builder-amazon-instance",
"digitalocean": "packer-builder-digitalocean",
"virtualbox": "packer-builder-virtualbox",