From c4522a6265a671e6fb80bfb4e1a827114b097995 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 22 May 2013 13:25:03 -0700 Subject: [PATCH] packer: Provisioner interface --- packer/provisioner.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packer/provisioner.go diff --git a/packer/provisioner.go b/packer/provisioner.go new file mode 100644 index 000000000..375524c71 --- /dev/null +++ b/packer/provisioner.go @@ -0,0 +1,16 @@ +package packer + +// A provisioner is responsible for installing and configuring software +// on a machine prior to building the actual image. +type Provisioner interface { + // Prepare is called with the raw configuration and a UI element in + // order to setup the internal state of the provisioner and perform + // any validation necessary for the provisioner. + Prepare(interface{}, Ui) + + // Provision is called to actually provision the machine. A UI is + // given to communicate with the user, and a communicator is given that + // is guaranteed to be connected to some machine so that provisioning + // can be done. + Provision(Ui, Communicator) +}