Class: OdaniaOps::Cli::Node
- Inherits:
-
Thor
- Object
- Thor
- OdaniaOps::Cli::Node
- Defined in:
- lib/odania_ops/cli/node.rb
Instance Method Summary collapse
Instance Method Details
#exec(*args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/odania_ops/cli/node.rb', line 7 def exec(*args) command = args.join(' ') on [:hosts].split(','), in: [:process].to_sym do |host| within '/tmp' do result = capture command result.split("\n").each do |line| info "#{host}: #{line}" end end end end |