lib/praegustator/wrappers/chef.rb in praegustator-0.2.0 vs lib/praegustator/wrappers/chef.rb in praegustator-0.3.0

- old
+ new

@@ -7,9 +7,10 @@ class Chef def self.search query ::Chef::Config.from_file(File.expand_path(Praegustator.config['chef']['knife_location'])) chef_query = ::Chef::Search::Query.new nodes = chef_query.search('node',query).first rescue [] + $stdout.puts "no node found for search criteria: #{query}" if nodes.empty? nodes.map{|n| Praegustator::Node.new n.name , n.ipaddress ,query} end end end end