Class: Vagrant::Provisioners::Base
- Inherits:
-
Object
- Object
- Vagrant::Provisioners::Base
- Includes:
- Util
- Defined in:
- lib/vagrant/provisioners/base.rb
Overview
The base class for a “provisioner.” A provisioner is responsible for provisioning a Vagrant system. This has been abstracted out to provide support for multiple solutions such as Chef Solo, Chef Client, and Puppet.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
The environment which this is being provisioned in.
Instance Method Summary collapse
-
#initialize(env) ⇒ Base
constructor
A new instance of Base.
-
#prepare ⇒ Object
This is the method called to “prepare” the provisioner.
-
#provision! ⇒ Object
This is the method called to provision the system.
Methods included from Util
#error_and_exit, included, #logger, #wrap_output
Constructor Details
#initialize(env) ⇒ Base
Returns a new instance of Base.
13 14 15 |
# File 'lib/vagrant/provisioners/base.rb', line 13 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
The environment which this is being provisioned in
11 12 13 |
# File 'lib/vagrant/provisioners/base.rb', line 11 def env @env end |
Instance Method Details
#prepare ⇒ Object
This is the method called to “prepare” the provisioner. This is called before any actions are run by the action runner (see Actions::Runner). This can be used to setup shared folders, forward ports, etc. Whatever is necessary on a “meta” level.
21 |
# File 'lib/vagrant/provisioners/base.rb', line 21 def prepare; end |
#provision! ⇒ Object
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.)
26 |
# File 'lib/vagrant/provisioners/base.rb', line 26 def provision!; end |