Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created September 22, 2010 23:47
Show Gist options
  • Save jtimberman/592800 to your computer and use it in GitHub Desktop.
Save jtimberman/592800 to your computer and use it in GitHub Desktop.
production role and search
name "production"
default_attributes(:app_environment => "production")
# in a recipe, get all the web servers in this node's environment
n = search(:node, "role:webserver AND app_environment:#{node['app_environment']}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment