Skip to content

Commit

Permalink
(choria-io#210) add the ping task from mcollective_agent_bolt_tasks
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <rip@devco.net>
  • Loading branch information
ripienaar committed Dec 28, 2020
1 parent ed6dfd7 commit 44ed850
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks/ping.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"description": "A basic echo task to test Choria Tasks functionality",
"input_method": "environment",
"parameters": {
"message": {
"description": "The message to echo back",
"type": "String[1]"
}
}
}
5 changes: 5 additions & 0 deletions tasks/ping.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/opt/puppetlabs/puppet/bin/ruby

require "json"

puts({"message" => ENV["PT_message"], "timestamp" => Time.now}.to_json)

0 comments on commit 44ed850

Please sign in to comment.