atheiman / better-chef-rundeck

A Sinatra app for integrating Chef and Rundeck
MIT License
13 stars 8 forks source link

paginate through all results from chef query #12

Closed atheiman closed 7 years ago

atheiman commented 8 years ago
chef_nodes = Chef::Search::Query.new.search(:node, query, filter_result: filter_result)[0]

should be

chef_nodes = []
Chef::Search::Query.new.search(:node, query, filter_result: filter_result) do |n|
  chef_nodes << n
end