diff --git a/lib/ansible/executor/process/result.py b/lib/ansible/executor/process/result.py index 7c75bbdfc2..92e43485f5 100644 --- a/lib/ansible/executor/process/result.py +++ b/lib/ansible/executor/process/result.py @@ -115,6 +115,8 @@ class ResultProcess(multiprocessing.Process): self._send_result(('v2_playbook_item_on_skipped', result)) else: self._send_result(('v2_playbook_item_on_ok', result)) + if 'diff' in result._result: + self._send_result(('v2_on_file_diff', result)) continue clean_copy = strip_internal_keys(result._result) diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index 8d40aaaefe..7a948e78d7 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -331,6 +331,9 @@ class StrategyBase: self._variable_manager.set_host_facts(target_host, facts) elif result[0].startswith('v2_playbook_item') or result[0] == 'v2_playbook_retry': self._tqm.send_callback(result[0], result[1]) + elif result[0] == 'v2_on_file_diff': + if self._diff: + self._tqm.send_callback('v2_on_file_diff', result[1]) else: raise AnsibleError("unknown result message received: %s" % result[0])