# File lib/mcollective/application/inventory.rb, line 243 def inventory(&blk) raise "Need to give a block to inventory" unless block_given? blk.call if block_given? raise "Need to define a format" if @fmt.nil? raise "Need to define inventory fields" if @flds.nil? util = rpcclient("rpcutil") util.progress = false util.inventory do |t, resp| @node = {:identity => resp[:sender], :facts => resp[:data][:facts], :classes => resp[:data][:classes], :agents => resp[:data][:agents]} puts @fmt % @flds.call end end