Support Ansible 2.8

Ansible has released 2.8 and now zuul also supports it. We've had to
update zuul_console to deal with new tasks stats, along with
gather_facts also now being exposed directly to the job.

Change-Id: Ifa4be7cf408b1f05b0f985fa0c9a5e3947858078
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Tobias Henkel
2019-01-19 18:07:35 +01:00
committed by Paul Belanger
parent 9f7c642ae1
commit 5b31159717
210 changed files with 366 additions and 1 deletions

View File

@@ -514,13 +514,24 @@ class CallbackModule(default.CallbackModule):
hosts = sorted(stats.processed.keys())
for host in hosts:
t = stats.summarize(host)
self._log(
msg = (
"{host} |"
" ok: {ok}"
" changed: {changed}"
" unreachable: {unreachable}"
" failed: {failures}".format(host=host, **t))
# NOTE(pabelanger) Ansible 2.8 added rescued support
if 'rescued' in t:
# Even though skipped was in stable-2.7 and lower, only
# stable-2.8 started rendering it. So just lump into rescued
# check.
msg += " skipped: {skipped} rescued: {rescued}".format(**t)
# NOTE(pabelanger) Ansible 2.8 added ignored support
if 'ignored' in t:
msg += " ignored: {ignored}".format(**t)
self._log(msg)
# Add a spacer line after the stats so that there will be a line
# between each playbook
self._log("")