Enhance logging, way to gate verbosity levels pending.

This commit is contained in:
Michael DeHaan 2012-03-20 21:44:01 -04:00
parent 05e27a419c
commit b5c62ec068
5 changed files with 28 additions and 11 deletions

View file

@ -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