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

Merge pull request #11073 from msabramo/include_more_info_in_errors

Include more info when a task fails
This commit is contained in:
Brian Coca 2015-05-26 14:26:50 -04:00
commit 7c6ebcab6d

View file

@ -487,6 +487,10 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
stdout = results2.pop('stdout', None) stdout = results2.pop('stdout', None)
returned_msg = results2.pop('msg', None) returned_msg = results2.pop('msg', None)
results2['task'] = self.task.name
results2['role'] = self.task.role_name
results2['playbook'] = self.playbook.filename
if item: if item:
msg = "failed: [%s] => (item=%s) => %s" % (host, item, utils.jsonify(results2)) msg = "failed: [%s] => (item=%s) => %s" % (host, item, utils.jsonify(results2))
else: else: