Class: Pec::Command::Base
- Inherits:
-
Object
- Object
- Pec::Command::Base
show all
- Defined in:
- lib/pec/command/base.rb
Class Method Summary
collapse
Class Method Details
.after_do ⇒ Object
21
|
# File 'lib/pec/command/base.rb', line 21
def self.after_do; end
|
.before_do ⇒ Object
20
|
# File 'lib/pec/command/base.rb', line 20
def self.before_do; end
|
.not_fetch ⇒ Object
18
|
# File 'lib/pec/command/base.rb', line 18
def self.not_fetch; end
|
.print_exception(e) ⇒ Object
13
14
15
16
|
# File 'lib/pec/command/base.rb', line 13
def self.print_exception(e)
Pec::Logger.critical(e)
Pec::Logger.info("\t" + e.backtrace.join("\n\t"))
end
|
.run(filter_hosts) ⇒ Object
3
4
5
6
7
8
9
10
11
|
# File 'lib/pec/command/base.rb', line 3
def self.run(filter_hosts)
before_do
Pec.servers(filter_hosts, not_fetch) do |server,config|
task(server, config)
end
after_do
rescue => e
print_exception(e)
end
|
.task(server, config) ⇒ Object
19
|
# File 'lib/pec/command/base.rb', line 19
def self.task(server, config); end
|