Skip to content

Instantly share code, notes, and snippets.

@danielsdeleo
Created January 6, 2011 16:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielsdeleo/74f2c72b64581b7ef182 to your computer and use it in GitHub Desktop.
Save danielsdeleo/74f2c72b64581b7ef182 to your computer and use it in GitHub Desktop.
put this in your client.rb
require 'chef/mixin/template'
require 'chef/provider/template'
module Chef::Mixin::Template
alias :original_render_template :render_template
def render_template(template, context)
STDERR.puts("rendering template with:")
STDERR.puts(template)
original_render_template(template, context)
end
end
class Chef::Provider::Template
alias :original_template_location :template_location
def template_location
result = original_template_location
STDERR.puts("Found template for #{@new_resource} at path #{result}")
result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment