Class: MCollective::Util::Playbook::Tasks::Base
Instance Attribute Summary collapse
Instance Method Summary
collapse
#__template_process_string, #__template_resolve, #t
Constructor Details
#initialize(playbook) ⇒ Base
Returns a new instance of Base.
11
12
13
14
15
16
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 11
def initialize(playbook)
@playbook = playbook
@fail_ok = false
startup_hook
end
|
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6
7
8
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 6
def description
@description
end
|
#fail_ok=(value) ⇒ Object
Sets the attribute fail_ok
7
8
9
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 7
def fail_ok=(value)
@fail_ok = value
end
|
Instance Method Details
#from_hash(properties) ⇒ Object
38
39
40
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 38
def from_hash(properties)
raise(StandardError, "from_hash not implemented", caller)
end
|
#run ⇒ Object
30
31
32
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 30
def run
raise(StandardError, "run not implemented", caller)
end
|
#run_task(result) ⇒ Object
24
25
26
27
28
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 24
def run_task(result)
validate_configuration!
result.timed_run(self)
end
|
#startup_hook ⇒ Object
18
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 18
def startup_hook; end
|
#to_s ⇒ Object
20
21
22
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 20
def to_s
"#<%s description: %s>" % [self.class, t(description)]
end
|
#validate_configuration! ⇒ Object
34
35
36
|
# File 'lib/mcollective/util/playbook/tasks/base.rb', line 34
def validate_configuration!
raise(StandardError, "validate_configuration! not implemented", caller)
end
|