Sha256: c057cf9f14866965f66aacf675e1f9a8f74b65846aa4b5a33d67b84f9385c700

Contents?: true

Size: 1.72 KB

Versions: 13

Compression:

Stored size: 1.72 KB

Contents

module Vagrant
  module Plugin
    module V2
      # This is the base class for a provisioner for the V2 API. A provisioner
      # is primarily responsible for installing software on a Vagrant guest.
      class Provisioner
        attr_reader :machine
        attr_reader :config

        # Initializes the provisioner with the machine that it will be
        # provisioning along with the provisioner configuration (if there
        # is any).
        #
        # The provisioner should _not_ do anything at this point except
        # initialize internal state.
        #
        # @param [Machine] machine The machine that this will be provisioning.
        # @param [Object] config Provisioner configuration, if one was set.
        def initialize(machine, config)
          @machine = machine
          @config  = config
        end

        # Called with the root configuration of the machine so the provisioner
        # can add some configuration on top of the machine.
        #
        # During this step, and this step only, the provisioner should modify
        # the root machine configuration to add any additional features it
        # may need. Examples include sharing folders, networking, and so on.
        # This step is guaranteed to be called before any of those steps are
        # done so the provisioner may do that.
        #
        # No return value is expected.
        def configure(root_config)
        end

        # This is the method called when the actual provisioning should be
        # done. The communicator is guaranteed to be ready at this point,
        # and any shared folders or networks are already setup.
        #
        # No return value is expected.
        def provision
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 5 rubygems

Version Path
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/lib/vagrant/plugin/v2/provisioner.rb
tnargav-1.2.3 lib/vagrant/plugin/v2/provisioner.rb
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/lib/vagrant/plugin/v2/provisioner.rb
vagrant-shell-0.2.6 vendor/bundle/gems/tnargav-1.2.2/lib/vagrant/plugin/v2/provisioner.rb
vagrant-shell-0.2.5 vendor/bundle/gems/tnargav-1.2.2/lib/vagrant/plugin/v2/provisioner.rb
tnargav-1.2.2 lib/vagrant/plugin/v2/provisioner.rb
vagrantup-1.1.3 lib/vagrant/plugin/v2/provisioner.rb
vagrantup-1.1.2 lib/vagrant/plugin/v2/provisioner.rb
vagrantup-1.1.1 lib/vagrant/plugin/v2/provisioner.rb
vagrantup-1.1.0 lib/vagrant/plugin/v2/provisioner.rb
vagrantup-1.1.4 lib/vagrant/plugin/v2/provisioner.rb
vagrant-actionio-0.0.9 vendor/bundle/bundler/gems/vagrant-c74251a1d9c0/lib/vagrant/plugin/v2/provisioner.rb
vagrant-lxc-0.0.1 vendor/vagrant/lib/vagrant/plugin/v2/provisioner.rb