bin/find-nodes in ruby-puppetdb-2.0.3 vs bin/find-nodes in ruby-puppetdb-2.1.0

- old
+ new

@@ -59,14 +59,14 @@ if options[:print] query = parser.parse(options[:query]) puts query.to_json elsif options[:facts] query = parser.facts_query(options[:query], options[:facts]) - parser.facts_hash(puppetdb.query(:facts, query, http)).each_value do |host| + parser.facts_hash(puppetdb.query(:facts, query, :extract => [:name, :value, :certname], :http => http)).each_value do |host| print options[:facts].collect { |f| host[f] if host.include? f }.join(',') + "\n" end else query = parser.parse(options[:query]) - results = puppetdb.query(:nodes, query, http) + results = puppetdb.query(:nodes, query, :extract => :certname, :http => http) hosts = results.collect { |host| host['certname'] } hosts.each { |host| print host + "\n" } end