Skip to content

Instantly share code, notes, and snippets.

@stevendanna
Created June 14, 2015 14:34
Show Gist options
  • Save stevendanna/26c410eb4c4c46594ff3 to your computer and use it in GitHub Desktop.
Save stevendanna/26c410eb4c4c46594ff3 to your computer and use it in GitHub Desktop.
def resource_exists?(resource_spec)
resources(resource_spec)
true
rescue Chef::Exceptions::ResourceNotFound
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment