Module: Chef::DSL::Recipe

Defined in:
lib/chef_metal_crowbar/recipe_dsl.rb

Instance Method Summary collapse

Instance Method Details

#with_crowbar_driver(provider, driver_options = nil, &block) ⇒ Object



22
23
24
25
26
# File 'lib/chef_metal_crowbar/recipe_dsl.rb', line 22

def with_crowbar_driver(provider, driver_options = nil, &block)
  config = Cheffish::MergedConfig.new({ :driver_options => driver_options }, run_context.config)
  driver = ChefMetalCrowbar::CrowbarDriver.from_provider(provider, config)
  run_context.chef_metal.with_driver(driver, &block)
end