Sha256: d5ad73f4da27d92bbec775c7881877d2d0006f976316e12a70e19c64a4e60484
Contents?: true
Size: 720 Bytes
Versions: 5
Compression:
Stored size: 720 Bytes
Contents
module SSHKit module Runner class Sequential < Abstract attr_writer :wait_interval def execute last_host = hosts.pop hosts.each do |host| run_backend(host, &block) sleep wait_interval end unless last_host.nil? run_backend(last_host, &block) end end private def run_backend(host, &block) backend(host, &block).run rescue StandardError => e e2 = ExecuteError.new e raise e2, "Exception while executing #{host.user ? "as #{host.user}@" : "on host "}#{host}: #{e.message}" end def wait_interval @wait_interval || options[:wait] || 2 end end end end
Version data entries
5 entries across 5 versions & 1 rubygems