# Facility for collecting and capturing/exporting failed/fatal results or entire summary

**URL:** <https://forum.ansible.com/t/facility-for-collecting-and-capturing-exporting-failed-fatal-results-or-entire-summary/21809>\
**Category:** Ansible Developer\
**Created:** [June 18, 2016, 8:50pm UTC](https://forum.ansible.com/t/facility-for-collecting-and-capturing-exporting-failed-fatal-results-or-entire-summary/21809 "2016-06-18T20:50:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mat\_h](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mat\_h](https://forum.ansible.com/u/mat_h)\
**Post date:** [June 18, 2016, 8:50pm UTC](https://forum.ansible.com/t/facility-for-collecting-and-capturing-exporting-failed-fatal-results-or-entire-summary/21809/1 "2016-06-18T20:50:39Z")

</div>

Is there a facility in Ansible for collecting and capturing/exporting failed/fatal results or the entire summary as a variable, or output to a file?

Basically what I want to be able to do is extract the information about failures from an ansible-playbook run and export them to another process, such as to send the results into an error handler or an alerting system or something like that. I can probably wrap the ansible-playbook job such that I could extract this information to export the results to a variable to pass into another process but this might be a feature that exists and I just haven’t been able to figure out. What’s the recommended way of doing something like this?

Thanks!

---

<div class="post-metadata">

**Author:** ![Danny\_Kimsey](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@Danny\_Kimsey](https://forum.ansible.com/u/Danny_Kimsey)\
**Post date:** [June 19, 2016, 6:02pm UTC](https://forum.ansible.com/t/facility-for-collecting-and-capturing-exporting-failed-fatal-results-or-entire-summary/21809/2 "2016-06-19T18:02:45Z")

</div>

In v2.0 there is a [stdout\_callback configuration option](http://docs.ansible.com/ansible/intro_configuration.html#stdout-callback), you could set it to “json” which will load the [corresponding plugin](https://github.com/ansible/ansible/blob/stable-2.1/lib/ansible/plugins/callback/json.py). Which would generate an a complete break-down of the run in json format. If you wanted the normal output (called skippy) too, I bet you could subclass/fork the built-in json module and have it write to a file instead into your [local callback\_plugins directory](http://docs.ansible.com/ansible/developing_plugins.html#callbacks).

Hopefully this will give you some guidance on options.

---

<div class="post-metadata">

**Author:** ![mat\_h](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mat\_h](https://forum.ansible.com/u/mat_h)\
**Post date:** [June 19, 2016, 7:09pm UTC](https://forum.ansible.com/t/facility-for-collecting-and-capturing-exporting-failed-fatal-results-or-entire-summary/21809/3 "2016-06-19T19:09:43Z")

</div>

Thanks Danny; this looks promising I’ll try it out.
