Sha256: 4c5bed138a712c318b1fda24bd16dd0ac75501acd7bddcaa5f966e23690f004c

Contents?: true

Size: 1.93 KB

Versions: 69

Compression:

Stored size: 1.93 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

        # This is the method called when destroying a machine that allows
        # for any state related to the machine created by the provisioner
        # to be cleaned up.
        def cleanup
        end
      end
    end
  end
end

Version data entries

69 entries across 62 versions & 9 rubygems

Version Path
vagrant-unbundled-2.2.2.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.2.0.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.1.4.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.1.2.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/plugin/v2/provisioner.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/plugin/v2/provisioner.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/plugin/v2/provisioner.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/plugin/v2/provisioner.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/plugin/v2/provisioner.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.1.1.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.0.4.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.0.3.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/lib/vagrant/plugin/v2/provisioner.rb
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/lib/vagrant/plugin/v2/provisioner.rb
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.0.2.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-unbundled-2.0.1.0 lib/vagrant/plugin/v2/provisioner.rb
vagrant-aws-mkubenka-0.7.2.pre.22 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-f3fdbf414272/lib/vagrant/plugin/v2/provisioner.rb
vagrant-aws-mkubenka-0.7.2.pre.16 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-1ee58c40e3f5/lib/vagrant/plugin/v2/provisioner.rb