Created
October 5, 2010 18:16
-
-
Save adamhjk/612039 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'chef' | |
| require 'chef/data_bag' | |
| require 'chef/data_bag_item' | |
| bag = Chef::DataBag.load("yourbag") | |
| # The "true" here just inflates them to the data bag items | |
| bag.list(true).each do |item| | |
| item["poop"] = "smith" | |
| item.save | |
| end | |
| # Or | |
| item = Chef::DataBagItem.load("yourbag", "key") | |
| item["snarf"] | |
| item.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment