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:
Monty Taylor 2017-07-20 02:09:10 +09:00
parent 1c39ec7361
commit 995df73d47
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 4 additions and 6 deletions

View File

@ -149,9 +149,6 @@ class CallbackModule(default.CallbackModule):
self._log("%s | %s " % (host, ln), ts=ts)
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]
def v2_playbook_on_include(self, included_file):
@ -406,9 +403,10 @@ class CallbackModule(default.CallbackModule):
" changed: {changed}"
" unreachable: {unreachable}"
" failed: {failures}".format(host=host, **t))
# Set this so that the next playbook start, if there is on, can emit
# a spacer line.
self._playbook_name = True
# Add a spacer line after the stats so that there will be a line
# between each playbook
self._log("")
def _process_deferred(self, result):
self._items_done = True