diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go index d04ccb97f..78b448787 100644 --- a/builder/amazon/chroot/builder.go +++ b/builder/amazon/chroot/builder.go @@ -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 { diff --git a/builder/amazon/chroot/step_check_ec2.go b/builder/amazon/chroot/step_check_ec2.go new file mode 100644 index 000000000..d600e8a8e --- /dev/null +++ b/builder/amazon/chroot/step_check_ec2.go @@ -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{}) {} diff --git a/config.go b/config.go index 4660fad1c..e2b701374 100644 --- a/config.go +++ b/config.go @@ -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", diff --git a/plugin/builder-amazon-ebs-chroot/main.go b/plugin/builder-amazon-chroot/main.go similarity index 100% rename from plugin/builder-amazon-ebs-chroot/main.go rename to plugin/builder-amazon-chroot/main.go