Skip to content

Instantly share code, notes, and snippets.

@adamhjk
Created August 15, 2011 22:18
Show Gist options
  • Save adamhjk/1148021 to your computer and use it in GitHub Desktop.
Save adamhjk/1148021 to your computer and use it in GitHub Desktop.
load a template with data
begin
r = resources(:template => "/tmp/yourthing")
rescue Chef::Exceptions::ResourceNotFound => e
r = template "/tmp/yourthing" do
variables { :your_defaults => ... }
end
end
r.variables[:your_stuff] = "here"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment