Skip to content

Instantly share code, notes, and snippets.

@williamsjj
Created March 28, 2016 22:35
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 williamsjj/a2a465668d6d2f1e1b4c to your computer and use it in GitHub Desktop.
Save williamsjj/a2a465668d6d2f1e1b4c to your computer and use it in GitHub Desktop.
resource_exists = proc do |name|
begin
resources name
true
rescue Chef::Exceptions::ResourceNotFound
false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment