Sha256: 7f447477759d10e0be6914ac0fec289f79a4947865280707e1f452c77122cf06

Contents?: true

Size: 1.34 KB

Versions: 21

Compression:

Stored size: 1.34 KB

Contents

module Vagrant
  module Provisioners
    # The base class for a "provisioner." A provisioner is responsible for
    # provisioning a Vagrant system. This has been abstracted out to provide
    # support for multiple solutions such as Chef Solo, Chef Client, and
    # Puppet.
    class Base
      include Vagrant::Util

      # The environment which provisioner is running in. This is a
      # {Vagrant::Action::Environment}
      attr_reader :action_env

      def initialize(env)
        @action_env = env
      end

      # Returns the actual {Vagrant::Environment} which this provisioner
      # represents.
      #
      # @return [Vagrant::Environment]
      def env
        action_env.env
      end

      # Returns the VM which this provisioner is working on.
      #
      # @return [Vagrant::VM]
      def vm
        env.vm
      end

      # This is the method called to "prepare" the provisioner. This is called
      # before any actions are run by the action runner (see {Vagrant::Actions::Runner}).
      # This can be used to setup shared folders, forward ports, etc. Whatever is
      # necessary on a "meta" level.
      def prepare; end

      # This is the method called to provision the system. This method
      # is expected to do whatever necessary to provision the system (create files,
      # SSH, etc.)
      def provision!; end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
vagrantup-0.6.9 lib/vagrant/provisioners/base.rb
vagrantup-0.6.8 lib/vagrant/provisioners/base.rb
vagrantup-0.6.7 lib/vagrant/provisioners/base.rb
vagrantup-0.6.6 lib/vagrant/provisioners/base.rb
vagrantup-0.6.5 lib/vagrant/provisioners/base.rb
vagrantup-0.6.4 lib/vagrant/provisioners/base.rb
vagrantup-0.6.3 lib/vagrant/provisioners/base.rb
vagrantup-0.6.2 lib/vagrant/provisioners/base.rb
vagrantup-0.6.1 lib/vagrant/provisioners/base.rb
vagrantup-0.6.0 lib/vagrant/provisioners/base.rb
vagrant-0.7.0.beta lib/vagrant/provisioners/base.rb
vagrant-0.6.9 lib/vagrant/provisioners/base.rb
vagrant-0.6.8 lib/vagrant/provisioners/base.rb
vagrant-0.6.7 lib/vagrant/provisioners/base.rb
vagrant-0.6.6 lib/vagrant/provisioners/base.rb
vagrant-0.6.5 lib/vagrant/provisioners/base.rb
vagrant-0.6.4 lib/vagrant/provisioners/base.rb
vagrant-0.6.3 lib/vagrant/provisioners/base.rb
vagrant-0.6.2 lib/vagrant/provisioners/base.rb
vagrant-0.6.1 lib/vagrant/provisioners/base.rb