Skip to content

Instantly share code, notes, and snippets.

/a.rb

Created August 11, 2011 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1139688 to your computer and use it in GitHub Desktop.
Save anonymous/1139688 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'ruote'
require 'ruote/storage/fs_storage'
engine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::FsStorage.new('work')))
pdef = Ruote.define do
concurrent-iterator :on_f => 'ips', :to_f => 'ip', :merge_type => 'concat' do
ssh :ip => '${ip}', :command => 'du -f'
end
emit_results
end
engine.register 'ssh', Taz::SshParticipant
engine.register 'emit_results', Taz::ResultParticipant
# ...
wfid = engine.launch(pdef, 'ips' => %w[ 192.168.1.1 192.168.1.2 192.168.1.3 ])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment