add per item diff handling

fixes #14843
This commit is contained in:
Brian Coca 2016-03-07 09:48:21 -05:00
parent f0b2af2f9d
commit 25e9b5788b
2 changed files with 5 additions and 0 deletions

View file

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

View file

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