Module: Kitchen::Provisioner
- Defined in:
- lib/kitchen/provisioner.rb,
lib/kitchen/provisioner/base.rb,
lib/kitchen/provisioner/dummy.rb,
lib/kitchen/provisioner/shell.rb,
lib/kitchen/provisioner/chef_base.rb,
lib/kitchen/provisioner/chef_solo.rb,
lib/kitchen/provisioner/chef_zero.rb,
lib/kitchen/provisioner/chef_apply.rb,
lib/kitchen/provisioner/chef/berkshelf.rb,
lib/kitchen/provisioner/chef/librarian.rb,
lib/kitchen/provisioner/chef/policyfile.rb,
lib/kitchen/provisioner/chef/common_sandbox.rb
Overview
A provisioner is responsible for generating the commands necessary to install set up and use a configuration management tool such as Chef and Puppet.
Defined Under Namespace
Modules: Chef Classes: Base, ChefApply, ChefBase, ChefSolo, ChefZero, Dummy, Shell
Constant Summary collapse
- DEFAULT_PLUGIN =
Default provisioner to use
"chef_solo".freeze
Class Method Summary collapse
-
.for_plugin(plugin, config) ⇒ Provisioner::Base
Returns an instance of a provisioner given a plugin type string.
Class Method Details
.for_plugin(plugin, config) ⇒ Provisioner::Base
Returns an instance of a provisioner given a plugin type string.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/kitchen/provisioner.rb', line 37 def self.for_plugin(plugin, config) first_load = require("kitchen/provisioner/#{plugin}") str_const = Thor::Util.camel_case(plugin) klass = const_get(str_const) object = klass.new(config) object.verify_dependencies if first_load object rescue LoadError, NameError raise ClientError, "Could not load the '#{plugin}' provisioner from the load path." \ " Please ensure that your provisioner is installed as a gem or" \ " included in your Gemfile if using Bundler." end |