Class: ChefApply::Action::GenerateCookbookFromResource

Inherits:
GenerateTempCookbook show all
Defined in:
lib/chef_apply/action/generate_temp_cookbook.rb

Instance Attribute Summary

Attributes inherited from GenerateTempCookbook

#generated_cookbook

Attributes inherited from Base

#config, #target_host

Instance Method Summary collapse

Methods inherited from GenerateTempCookbook

from_options, #initialize, #perform_action

Methods inherited from Base

#initialize, #name, #notify, #perform_action, #run

Constructor Details

This class inherits a constructor from ChefApply::Action::GenerateTempCookbook

Instance Method Details

#generateObject



73
74
75
76
77
78
79
# File 'lib/chef_apply/action/generate_temp_cookbook.rb', line 73

def generate
  type = config.delete :resource_type
  name = config.delete :resource_name
  props = config.delete :resource_properties
  ChefApply::Log.debug("Generating cookbook for ad-hoc resource #{type}[#{name}]")
  generated_cookbook.from_resource(type, name, props)
end