From 28883975bf52cc9f49da0578666509bc51ca97cb Mon Sep 17 00:00:00 2001 From: Chris Church Date: Mon, 14 Nov 2016 02:23:02 -0500 Subject: [PATCH] Increment changed stat for a failed task if changed. (#18014) (cherry picked from commit 534bd12ae9c96b3804f0bfb8646a2ffa3444b942) --- lib/ansible/plugins/strategy/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index f2cf7844d24..a90ada97aab 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -368,6 +368,8 @@ class StrategyBase: ) else: self._tqm._stats.increment('ok', original_host.name) + if 'changed' in task_result._result and task_result._result['changed']: + self._tqm._stats.increment('changed', original_host.name) self._tqm.send_callback('v2_runner_on_failed', task_result, ignore_errors=original_task.ignore_errors) elif task_result.is_unreachable(): self._tqm._unreachable_hosts[original_host.name] = True