Skip to content

Instantly share code, notes, and snippets.

@fearoffish
Created July 28, 2010 14:59
Show Gist options
  • Save fearoffish/494795 to your computer and use it in GitHub Desktop.
Save fearoffish/494795 to your computer and use it in GitHub Desktop.
class Chef
class Recipe
def run_for_instance_role(*roles, &block)
roles.map! {|a| a.to_s }
if roles.include?(node[:instance_role])
block.call
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment