Class: Bow::Commands::Apply
- Inherits:
-
Bow::Command
- Object
- Bow::Command
- Bow::Commands::Apply
- Defined in:
- lib/bow/commands/apply.rb
Instance Attribute Summary
Attributes inherited from Bow::Command
Instance Method Summary collapse
Methods inherited from Bow::Command
#command_name, command_name, find, inherited, #initialize, #targets, #usage
Constructor Details
This class inherits a constructor from Bow::Command
Instance Method Details
#description ⇒ Object
6 7 8 |
# File 'lib/bow/commands/apply.rb', line 6 def description 'Apply provision on remote hosts.' end |
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/bow/commands/apply.rb', line 10 def run ThreadPool.new do |t| t.from_enumerable targets do |host| result = app.ssh_helper(host).prepare_provision(PROVISION_PATH) ResponseFormatter.pretty_print(host, result) cmd = "'cd #{PROVISION_PATH} && rake #{host.group}:provision'" result = app.ssh_helper(host).execute(cmd) ResponseFormatter.pretty_print(host, result) end end end |