provisioner/shell and plugin/provisioner-shell
This commit is contained in:
parent
84891701bd
commit
46a058572b
|
@ -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))
|
||||
}
|
|
@ -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")
|
||||
}
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue