|
|
@ -145,8 +145,8 @@ def banner(msg):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
width = 78 - len(msg)
|
|
|
|
width = 78 - len(msg)
|
|
|
|
if width < 3:
|
|
|
|
if width < 3:
|
|
|
|
width = 3
|
|
|
|
width = 3
|
|
|
|
filler = "-" * width
|
|
|
|
filler = "*" * width
|
|
|
|
return "\n%s %s " % (msg, filler)
|
|
|
|
return "\n%s %s " % (msg, filler)
|
|
|
|
|
|
|
|
|
|
|
|
def command_generic_msg(hostname, result, oneline, caption):
|
|
|
|
def command_generic_msg(hostname, result, oneline, caption):
|
|
|
@ -293,7 +293,7 @@ class CliRunnerCallbacks(DefaultRunnerCallbacks):
|
|
|
|
print host_report_msg(host, self.options.module_name, result2, self.options.one_line)
|
|
|
|
print host_report_msg(host, self.options.module_name, result2, self.options.one_line)
|
|
|
|
if self.options.tree:
|
|
|
|
if self.options.tree:
|
|
|
|
utils.write_tree_file(self.options.tree, host, utils.jsonify(result2,format=True))
|
|
|
|
utils.write_tree_file(self.options.tree, host, utils.jsonify(result2,format=True))
|
|
|
|
|
|
|
|
|
|
|
|
def on_file_diff(self, host, diff):
|
|
|
|
def on_file_diff(self, host, diff):
|
|
|
|
print utils.get_diff(diff)
|
|
|
|
print utils.get_diff(diff)
|
|
|
|
super(CliRunnerCallbacks, self).on_file_diff(host, diff)
|
|
|
|
super(CliRunnerCallbacks, self).on_file_diff(host, diff)
|
|
|
@ -465,7 +465,7 @@ class PlaybookCallbacks(object):
|
|
|
|
resp = raw_input('Perform task: %s (y/n/c): ' % name)
|
|
|
|
resp = raw_input('Perform task: %s (y/n/c): ' % name)
|
|
|
|
if resp.lower() in ['y','yes']:
|
|
|
|
if resp.lower() in ['y','yes']:
|
|
|
|
self.skip_task = False
|
|
|
|
self.skip_task = False
|
|
|
|
print banner(msg)
|
|
|
|
print banner(msg)
|
|
|
|
elif resp.lower() in ['c', 'continue']:
|
|
|
|
elif resp.lower() in ['c', 'continue']:
|
|
|
|
self.skip_task = False
|
|
|
|
self.skip_task = False
|
|
|
|
self.step = False
|
|
|
|
self.step = False
|
|
|
@ -473,8 +473,8 @@ class PlaybookCallbacks(object):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.skip_task = True
|
|
|
|
self.skip_task = True
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
print banner(msg)
|
|
|
|
print banner(msg)
|
|
|
|
|
|
|
|
|
|
|
|
call_callback_module('playbook_on_task_start', name, is_conditional)
|
|
|
|
call_callback_module('playbook_on_task_start', name, is_conditional)
|
|
|
|
|
|
|
|
|
|
|
|
def on_vars_prompt(self, varname, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None, default=None):
|
|
|
|
def on_vars_prompt(self, varname, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None, default=None):
|
|
|
|