mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Enhance logging, way to gate verbosity levels pending.
This commit is contained in:
@@ -465,8 +465,12 @@ class PlayBook(object):
|
||||
SETUP_CACHE[host].update(data)
|
||||
self.callbacks.on_import_for_host(host, filename2)
|
||||
break
|
||||
else:
|
||||
self.callbacks.on_not_import_for_host(host, filename2)
|
||||
if not found:
|
||||
raise errors.AnsibleError("no files matched for vars_files import sequence: %s" % sequence)
|
||||
raise errors.AnsibleError(
|
||||
"%s: FATAL, no files matched for vars_files import sequence: %s" % (host, sequence)
|
||||
)
|
||||
|
||||
else:
|
||||
filename2 = utils.path_dwim(self.basedir, utils.template(filename, cache_vars))
|
||||
@@ -508,6 +512,8 @@ class PlayBook(object):
|
||||
if 'failed' in host_result:
|
||||
self.callbacks.on_failed(host, host_result)
|
||||
self.failures[host] = 1
|
||||
else:
|
||||
self.callbacks.on_ok(host, host_result)
|
||||
|
||||
# now for each result, load into the setup cache so we can
|
||||
# let runner template out future commands
|
||||
|
||||
@@ -54,9 +54,9 @@ def smjson(result):
|
||||
|
||||
def task_start_msg(name, conditional):
|
||||
if conditional:
|
||||
return "NOTIFIED: [%s] **********\n" % name
|
||||
return "\nNOTIFIED: [%s] **********\n" % name
|
||||
else:
|
||||
return "TASK: [%s] *********\n" % name
|
||||
return "\nTASK: [%s] *********\n" % name
|
||||
|
||||
def regular_generic_msg(hostname, result, oneline, caption):
|
||||
''' output on the result of a module run that is not command '''
|
||||
|
||||
Reference in New Issue
Block a user