# Remove stderr/stdout from json output on failure as plugin handles already pretty printing

**URL:** <https://forum.ansible.com/t/remove-stderr-stdout-from-json-output-on-failure-as-plugin-handles-already-pretty-printing/21981>\
**Category:** Ansible Project\
**Created:** [July 11, 2016, 6:32am UTC](https://forum.ansible.com/t/remove-stderr-stdout-from-json-output-on-failure-as-plugin-handles-already-pretty-printing/21981 "2016-07-11T06:32:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamil\_Demecki](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@Kamil\_Demecki](https://forum.ansible.com/u/Kamil_Demecki)\
**Post date:** [July 11, 2016, 6:32am UTC](https://forum.ansible.com/t/remove-stderr-stdout-from-json-output-on-failure-as-plugin-handles-already-pretty-printing/21981/1 "2016-07-11T06:32:21Z")

</div>

Hi All,

I’m using plugin described [here](http://blog.cliffano.com/2014/04/06/human-readable-ansible-playbook-log-output-using-callback-plugin/) to display pretty printed output. It is working very well on successful execution.  
However on failure ansible also displays json with keys “stdout”, “stderr” duplicating my output.  
Json is quite big and unreadable as I log hundreds lines in some places.

Is there a way to “mask” keys from json output presented when ansible fails? I would like to have a dict with something like replaced stderr=“Already printed”.  
I’ve tried to modify dictionary in callback plugin but it doesn’t take effect. Is any good example on [github](https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins)?

I’m using Ansible 2.0.0.1.

Thanks
