Method: EvilChef::Runner#recipe_eval
- Defined in:
- lib/evil-chef.rb
#recipe_eval(&block) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/evil-chef.rb', line 22 def recipe_eval(&block) run_context = init_run_context recipe = ::Chef::Recipe.new("(evil-chef cookbook)", "(evil-chef recipe)", run_context) recipe.instance_eval(&block) runner = ::Chef::Runner.new(run_context) begin runner.converge rescue Exception => e @chef_client.run_status.exception = e end @chef_client.run_status end |