Method: Chef::Node.list
- Defined in:
- lib/chef/node.rb
.list(inflate = false) ⇒ Object
622 623 624 625 626 627 628 629 630 631 632 633 |
# File 'lib/chef/node.rb', line 622 def self.list(inflate = false) if inflate response = {} Chef::Search::Query.new.search(:node) do |n| n = Chef::Node.from_hash(n) response[n.name] = n unless n.nil? end response else Chef::ServerAPI.new(Chef::Config[:chef_server_url]).get("nodes") end end |