Class: Skipper::Runner
- Inherits:
-
Object
- Object
- Skipper::Runner
- Defined in:
- lib/skipper/runner.rb
Instance Method Summary collapse
-
#initialize(servers, options = {}, cli) ⇒ Runner
constructor
A new instance of Runner.
- #run(command) ⇒ Object
Constructor Details
#initialize(servers, options = {}, cli) ⇒ Runner
Returns a new instance of Runner.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/skipper/runner.rb', line 7 def initialize(servers, = {}, cli) @servers = servers = @cli = cli SSHKit::Backend::Netssh.configure do |ssh| ssh. = end SSHKit.config.output_verbosity = Logger::DEBUG if .output? end |
Instance Method Details
#run(command) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/skipper/runner.rb', line 19 def run(command) on servers.hosts, do execute command end rescue SSHKit::Runner::ExecuteError => e cli.say e, :red rescue Interrupt puts '' end |