Sha256: ac3f77c74c87e56ceedaa90c8ef031cf5cec878ceaf5f44844d7e2a11510f380

Contents?: true

Size: 1.51 KB

Versions: 40

Compression:

Stored size: 1.51 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 so it is easy to provide support for
    # multiple solutions.
    class Base
      include Vagrant::Util

      # 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 configuration
      # for the provisioner.
      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.
      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

Version data entries

40 entries across 40 versions & 6 rubygems

Version Path
bmhatfield-vagrant-1.0.10 lib/vagrant/provisioners/base.rb
bmhatfield-vagrant-1.0.9 lib/vagrant/provisioners/base.rb
bmhatfield-vagrant-1.0.8 lib/vagrant/provisioners/base.rb
bmhatfield-vagrant-1.0.7 lib/vagrant/provisioners/base.rb
vagrantup-1.0.7 lib/vagrant/provisioners/base.rb
vagrantup-1.0.6 lib/vagrant/provisioners/base.rb
vagrantup-1.0.5 lib/vagrant/provisioners/base.rb
vagrantup-1.0.4 lib/vagrant/provisioners/base.rb
vagrantup-1.0.3 lib/vagrant/provisioners/base.rb
vagrantup-1.0.2 lib/vagrant/provisioners/base.rb
vagrantup-1.0.1 lib/vagrant/provisioners/base.rb
vagrantup-1.0.0 lib/vagrant/provisioners/base.rb
vagrantup-0.9.99.2 lib/vagrant/provisioners/base.rb
vagrantup-0.9.99.1 lib/vagrant/provisioners/base.rb
vagrantup-0.9.7 lib/vagrant/provisioners/base.rb
vagrantup-0.9.6 lib/vagrant/provisioners/base.rb
vagrantup-0.9.5 lib/vagrant/provisioners/base.rb
vagrantup-0.9.4 lib/vagrant/provisioners/base.rb
vagrantup-0.9.3 lib/vagrant/provisioners/base.rb
vagrantup-0.9.2 lib/vagrant/provisioners/base.rb