Skip to content

Commit

Permalink
Merge pull request choria-io#211 from ripienaar/210
Browse files Browse the repository at this point in the history
(choria-io#210) add the ping task from mcollective_agent_bolt_tasks
  • Loading branch information
ripienaar authored Dec 28, 2020
2 parents ed6dfd7 + 44ed850 commit 274835f
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 274835f

Please sign in to comment.