provisioner/shell and plugin/provisioner-shell

This commit is contained in:
Mitchell Hashimoto 2013-05-23 22:38:40 -07:00
parent 84891701bd
commit 46a058572b
3 changed files with 47 additions and 0 deletions

View File

@ -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))
}

View File

@ -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")
}

View File

@ -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")
}
}