diff --git a/plugin/provisioner-shell/main.go b/plugin/provisioner-shell/main.go new file mode 100644 index 000000000..c14b11600 --- /dev/null +++ b/plugin/provisioner-shell/main.go @@ -0,0 +1,10 @@ +package main + +import ( + "github.com/mitchellh/packer/provisioner/shell" + "github.com/mitchellh/packer/packer/plugin" +) + +func main() { + plugin.ServeProvisioner(new(shell.Provisioner)) +} diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go new file mode 100644 index 000000000..5561dc93c --- /dev/null +++ b/provisioner/shell/provisioner.go @@ -0,0 +1,22 @@ +// This package implements a provisioner for Packer that executes +// shell scripts within the remote machine. +package shell + +import ( + "github.com/mitchellh/packer/packer" +) + +// TODO(mitchellh): config +type config struct { +} + +type Provisioner struct { + config config +} + +func (p *Provisioner) Prepare(raw interface{}, ui packer.Ui) { +} + +func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) { + ui.Say("PROVISIONING SOME STUFF") +} diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go new file mode 100644 index 000000000..2f67b0160 --- /dev/null +++ b/provisioner/shell/provisioner_test.go @@ -0,0 +1,15 @@ +package shell + +import ( + "github.com/mitchellh/packer/packer" + "testing" +) + +func TestProvisioner_Impl(t *testing.T) { + var raw interface{} + raw = &Provisioner{} + if _, ok := raw.(packer.Provisioner); !ok { + t.Fatalf("must be a Provisioner") + } +} +