Skip to content

Commit

Permalink
Added new functionality to README
Browse files Browse the repository at this point in the history
  • Loading branch information
relistan committed Mar 5, 2013
1 parent 1333469 commit 1156a79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ This defines the same roles using Chef's [search feature](http://wiki.opscode.co

The `limit` attribute of the options hash will make it so only that the given number of items will be returned from a search.

You can also define multiple roles at the same time if the host list is identical. Instead of running multiple searches to the Chef server, you can pass an Array to `chef_role`:

chef_role [:web, :app], 'roles:web', :attribute => Proc.new do |n|
n["network"]["interfaces"]["eth1"]["addresses"].select{|address, data| data["family"] == "inet" }.keys.first
end

## Data Bags

Chef [Data Bags](http://wiki.opscode.com/display/chef/Data+Bags) let you store arbitrary JSON data. A common pattern is to use an _apps_ data bag to store data about an application for use in configuration and deployment.
Expand Down

0 comments on commit 1156a79

Please sign in to comment.