125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
# File 'lib/mcollective/util/playbook/tasks.rb', line 125
def run
@playbook.in_context("running") do
unless run_set("pre_book")
Log.warn("Playbook pre_book hook failed to run, failing entire playbook")
return false
end
success = run_set("tasks")
Log.info("Finished running main tasks in playbook: success: %s" % success)
if success
success = run_set("on_success")
else
run_set("on_fail")
end
unless run_set("post_book")
Log.warn("Playbook post_book hook failed to run, failing entire playbookbook")
return false
end
success
end
end
|