Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…ptions (class/facts/etc)
  • Loading branch information...
commit 672c6537f5d3ef1370ea7ccb5b24edc493a26f91 1 parent 90adce4
Aaron Nichols authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 filemd5er/mc-filemd5er
View
9 filemd5er/mc-filemd5er
@@ -4,6 +4,11 @@ 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
@@ -11,7 +16,7 @@ else
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
Please sign in to comment.
Something went wrong with that request. Please try again.