1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Increment changed stat for a failed task if changed. (#18014)

This commit is contained in:
Chris Church 2016-11-14 02:23:02 -05:00 committed by James Cammarata
parent 4f06a86161
commit 534bd12ae9

View file

@ -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