Fix "Set failed, unreachable, skipped statuses in json plugin"
This change was ineffective because it was modifying the wrong data. Correct that and add a test. Change-Id: I26cfba0ff9a3eca05314e12f3f1d66b934c505b6
This commit is contained in:
@@ -158,11 +158,13 @@ class CallbackModule(CallbackBase):
|
||||
|
||||
def v2_runner_on_failed(self, result, **kwargs):
|
||||
self.v2_runner_on_ok(result, **kwargs)
|
||||
result._host.setdefault('failed', True)
|
||||
self.results[-1]['tasks'][-1]['hosts'][result._host.name].\
|
||||
setdefault('failed', True)
|
||||
|
||||
def v2_runner_on_skipped(self, result, **kwargs):
|
||||
self.v2_runner_on_ok(result, **kwargs)
|
||||
result._host.setdefault('skipped', True)
|
||||
self.results[-1]['tasks'][-1]['hosts'][result._host.name].\
|
||||
setdefault('skipped', True)
|
||||
|
||||
def v2_playbook_on_stats(self, stats):
|
||||
"""Display info about playbook statistics"""
|
||||
|
||||
Reference in New Issue
Block a user