class Vagrant::Plugin::V1::Provisioner
This is the base class for a provisioner for the V1
API. A provisioner is primarily responsible for installing software on a Vagrant
guest.
Attributes
The configuration for this provisioner. This will be an instance of the ‘Config` class which is part of the provisioner.
The environment which provisioner is running in. This is the action environment, not a Vagrant::Environment
.
Public Class Methods
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]
# File lib/vagrant/plugin/v1/provisioner.rb, line 25 def self.config_class end
# File lib/vagrant/plugin/v1/provisioner.rb, line 15 def initialize(env, config) @env = env @config = config end
Public Instance Methods
This is the method called to when the system is being destroyed and allows the provisioners to engage in any cleanup tasks necessary.
# File lib/vagrant/plugin/v1/provisioner.rb, line 45 def cleanup 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.
# File lib/vagrant/plugin/v1/provisioner.rb, line 34 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.)
# File lib/vagrant/plugin/v1/provisioner.rb, line 40 def provision! end