X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=plugins%2Fmcollective%2Fagent%2Frpcutil.rb;h=0422286895435956eec66fdb1abcb2fe88bf1605;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=1c8c71e36d4caa5351c237196cba1ec0ecc1385e;hpb=b87d2f4e68281062df1913440ca5753ae63314a9;p=packages%2Fprecise%2Fmcollective.git diff --git a/plugins/mcollective/agent/rpcutil.rb b/plugins/mcollective/agent/rpcutil.rb index 1c8c71e..0422286 100644 --- a/plugins/mcollective/agent/rpcutil.rb +++ b/plugins/mcollective/agent/rpcutil.rb @@ -21,6 +21,15 @@ module MCollective action "get_fact" do reply[:fact] = request[:fact] reply[:value] = Facts[request[:fact]] + end + + action "get_facts" do + response = {} + request[:facts].split(',').map { |x| x.strip }.each do |fact| + value = Facts[fact] + response[fact] = value + end + reply[:values] = response end # Get the global stats for this mcollectied