Created
June 25, 2012 19:11
-
-
Save jtimberman/2990600 to your computer and use it in GitHub Desktop.
Work with the Chef Server API in the "main" context of "Shef" (Chef Console)
This file contains 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/shef/ext' | |
Shef::Extensions.extend_context_object(self) | |
Chef::Config.from_file("/etc/chef/knife.rb") | |
search(:node, "role:base") # => [node[i-9c8168e5]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Further information on the Chef wiki.