Skip to content

Instantly share code, notes, and snippets.

@jpadams
Created November 6, 2013 14:36
Show Gist options
  • Save jpadams/7337035 to your computer and use it in GitHub Desktop.
Save jpadams/7337035 to your computer and use it in GitHub Desktop.
module MCollective
module Agent
class Windowsrun<RPC::Agent
#test of windows run
action "run" do
name = request[:name]
month = request[:birthmonth]
day = request[:birthday]
command = "name.bat ${name} ${month} ${day}"
reply[:status] = run(command,:stdout => :out, :stderr => :err, :chomp => true)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment