Class: Blender::Driver::SshMulti
- Defined in:
- lib/blender/drivers/ssh_multi.rb
Instance Attribute Summary
Attributes inherited from Ssh
Attributes inherited from Base
#config, #events, #stderr, #stdout
Instance Method Summary collapse
Methods inherited from Ssh
Methods included from SSHExec
Methods inherited from Base
Constructor Details
This class inherits a constructor from Blender::Driver::Ssh
Instance Method Details
#execute(tasks, hosts) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/blender/drivers/ssh_multi.rb', line 28 def execute(tasks, hosts) Log.debug("SSH execution tasks [#{tasks.size}]") Log.debug("SSH on hosts [#{hosts.join("\n")}]") Array(tasks).each do |task| session = create_session(hosts, task.[:concurrency]) cmd = run_command(task.command, session) if cmd.exitstatus != 0 and !task.[:ignore_failure] raise ExecutionFailed, cmd.stderr end session.loop end end |