Sha256: 39cd23cec2ab83833204d2c744d53322bd5145f0497a78cf1ac26e74da5cceb7

Contents?: true

Size: 1.68 KB

Versions: 82

Compression:

Stored size: 1.68 KB

Contents

module Vagrant
  module Plugin
    module V1
      # This is the base class for a provisioner for the V1 API. A provisioner
      # is primarily responsible for installing software on a Vagrant guest.
      class Provisioner
        # The environment which provisioner is running in. This is the
        # action environment, not a Vagrant::Environment.
        attr_reader :env

        # The configuration for this provisioner. This will be an instance of
        # the `Config` class which is part of the provisioner.
        attr_reader :config

        def initialize(env, config)
          @env    = env
          @config = config
        end

        # This method is expected to return a class that is used for
        # configuring the provisioner. This return value is expected to be
        # a subclass of {Config}.
        #
        # @return [Config]
        def self.config_class
        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.
        #
        # No return value is expected.
        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

        # This is the method called to when the system is being destroyed
        # and allows the provisioners to engage in any cleanup tasks necessary.
        def cleanup
        end
      end
    end
  end
end

Version data entries

82 entries across 75 versions & 13 rubygems

Version Path
vagrant-unbundled-2.3.6.0 lib/vagrant/plugin/v1/provisioner.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.3.3.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.3.2.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.19.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.18.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.16.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.14.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.10.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.9.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.8.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.7.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.6.2 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.6.1 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.6.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.5.0 lib/vagrant/plugin/v1/provisioner.rb
tamtam-vagrant-reload-1.1.3 vendor/cache/vagrant-0ac2a8738841/lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.4.0 lib/vagrant/plugin/v1/provisioner.rb
vagrant-unbundled-2.2.3.0 lib/vagrant/plugin/v1/provisioner.rb