karmi/cookbook-elasticsearch — pull request #54 by ryansch (2013-01-25 20:44:41+00:00)
Title: Add environment data bag loader

This is a more invasive change but I thought it would be worth discussing.

I use databags to load per-environment settings (production, staging, etc). This `DataBagLoader` merges in any keys it finds in environments to overwrite default (top level) keys.

Example:
Data bag elasticsearch
```json
{"id":"aws",
"production":{"cloud":{"aws":
{"access_key":"productionIAMkey","secret_key":"supersecret"}}},
"staging":{"cloud":{"aws":
{"access_key":"stagingIAMkey","secret_key":"foobar"}}}
}
```