Permalink
Browse files

Added options so that you can filter targets by typical mcollective o…

…ptions (class/facts/etc)
  • Loading branch information...
1 parent 90adce4 commit 672c6537f5d3ef1370ea7ccb5b24edc493a26f91 Aaron Nichols committed Nov 23, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 filemd5er/mc-filemd5er
View
9 filemd5er/mc-filemd5er
@@ -4,14 +4,19 @@ require 'pp'
include MCollective::RPC
+options = rpcoptions do |parser, options|
+ parser.define_head "Get checksum of file across many hosts"
+ parser.banner = "Usage: mc-filemd5er <file>"
+end
+
if ARGV.length > 0
filename = ARGV.shift
else
puts "filemd5er needs a filename"
exit 1
end
-filemd5er = rpcclient("filemd5er")
+filemd5er = rpcclient("filemd5er", :options => options)
checksums = Hash.new()
@@ -39,4 +44,4 @@ checksums.keys.sort.each do |k|
end
-filemd5er.printrpcstats
+printrpcstats

0 comments on commit 672c653

Please sign in to comment.