|
|
|
@ -219,7 +219,8 @@ class DefaultRunnerCallbacks(object):
|
|
|
|
|
call_callback_module('runner_on_async_failed', host, res, jid)
|
|
|
|
|
|
|
|
|
|
def on_file_diff(self, host, before_string, after_string):
|
|
|
|
|
call_callback_module('runner_on_file_diff', before_string, after_string)
|
|
|
|
|
if before_string and after_string:
|
|
|
|
|
call_callback_module('runner_on_file_diff', before_string, after_string)
|
|
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
|
@ -286,9 +287,10 @@ class CliRunnerCallbacks(DefaultRunnerCallbacks):
|
|
|
|
|
utils.write_tree_file(self.options.tree, host, utils.jsonify(result2,format=True))
|
|
|
|
|
|
|
|
|
|
def on_file_diff(self, host, before_string, after_string):
|
|
|
|
|
if self.options.diff:
|
|
|
|
|
print utils.get_diff(before_string, after_string)
|
|
|
|
|
super(CliRunnerCallbacks, self).on_file_diff(host, before_string, after_string)
|
|
|
|
|
if before_string and after_string:
|
|
|
|
|
if self.options.diff:
|
|
|
|
|
print utils.get_diff(before_string, after_string)
|
|
|
|
|
super(CliRunnerCallbacks, self).on_file_diff(host, before_string, after_string)
|
|
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
|
@ -422,8 +424,9 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
|
|
|
|
|
super(PlaybookRunnerCallbacks, self).on_async_failed(host,res,jid)
|
|
|
|
|
|
|
|
|
|
def on_file_diff(self, host, before_string, after_string):
|
|
|
|
|
print utils.get_diff(before_string, after_string)
|
|
|
|
|
super(PlaybookRunnerCallbacks, self).on_file_diff(host, before_string, after_string)
|
|
|
|
|
if before_string and after_string:
|
|
|
|
|
print utils.get_diff(before_string, after_string)
|
|
|
|
|
super(PlaybookRunnerCallbacks, self).on_file_diff(host, before_string, after_string)
|
|
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
|
|