Add spacer after playbook stats rather than before playbook
We were trying to be clever and only emit a space before playbook start if it was not the first. WHOOPS. Instance variables to not persist across process boundaries - so the stats call cannot set a variable for the playbook_on_start to read. Change-Id: I5fb19102d4e5903f3a49c16df5701a70b93b0b1f
This commit is contained in:
parent
1c39ec7361
commit
995df73d47
@ -149,9 +149,6 @@ class CallbackModule(default.CallbackModule):
|
|||||||
self._log("%s | %s " % (host, ln), ts=ts)
|
self._log("%s | %s " % (host, ln), ts=ts)
|
||||||
|
|
||||||
def v2_playbook_on_start(self, playbook):
|
def v2_playbook_on_start(self, playbook):
|
||||||
if self._playbook_name:
|
|
||||||
# We had a previous playbook, emit a spacer.
|
|
||||||
self._log("")
|
|
||||||
self._playbook_name = os.path.splitext(playbook._file_name)[0]
|
self._playbook_name = os.path.splitext(playbook._file_name)[0]
|
||||||
|
|
||||||
def v2_playbook_on_include(self, included_file):
|
def v2_playbook_on_include(self, included_file):
|
||||||
@ -406,9 +403,10 @@ class CallbackModule(default.CallbackModule):
|
|||||||
" changed: {changed}"
|
" changed: {changed}"
|
||||||
" unreachable: {unreachable}"
|
" unreachable: {unreachable}"
|
||||||
" failed: {failures}".format(host=host, **t))
|
" failed: {failures}".format(host=host, **t))
|
||||||
# Set this so that the next playbook start, if there is on, can emit
|
|
||||||
# a spacer line.
|
# Add a spacer line after the stats so that there will be a line
|
||||||
self._playbook_name = True
|
# between each playbook
|
||||||
|
self._log("")
|
||||||
|
|
||||||
def _process_deferred(self, result):
|
def _process_deferred(self, result):
|
||||||
self._items_done = True
|
self._items_done = True
|
||||||
|
Loading…
Reference in New Issue
Block a user