Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (8 sloc) 332 Bytes
require 'mcollective'
include MCollective::RPC
mc = rpcclient("chefresource")
mc.progress = false
r = [ { "action" => "restart" }, { "supports" => {:status => true } } ]
mc.handle(:resourcename => "cron", :resourcetype => "service", :resourceactions => r).each do |resp|
puts resp[:sender] + " => " + resp[:status].inspect
end