Skip to content

Instantly share code, notes, and snippets.

@philips
Created May 26, 2011 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philips/993775 to your computer and use it in GitHub Desktop.
Save philips/993775 to your computer and use it in GitHub Desktop.
31 if (new_resource.key =~ /http/)
32 key_file = method(:remote_file)
33 else
34 key_file = method(:cookbook_file)
35 end
36
37 key_file.call "#{Chef::Config[:file_cache_path]}/#{key_name}" do
38 source new_resource.key
39 mode "0644"
40 action :nothing
41 end.run_action(:create_if_missing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment