# custom callback plugin for AWX

**URL:** <https://forum.ansible.com/t/custom-callback-plugin-for-awx/32309>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [February 23, 2020, 2:21pm UTC](https://forum.ansible.com/t/custom-callback-plugin-for-awx/32309 "2020-02-23T14:21:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Punit\_Jain](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@Punit\_Jain](https://forum.ansible.com/u/Punit_Jain)\
**Post date:** [February 23, 2020, 2:21pm UTC](https://forum.ansible.com/t/custom-callback-plugin-for-awx/32309/1 "2020-02-23T14:21:37Z")

</div>

Hi ,

I am trying to get back o/p as a json so I am using json callback pluugin. My playbook str:

admin$ ls  
README.md ansible.cfg callback\_plugins test.yml

also ansible.cfg

admin$ cat ansible.cfg  
[defaults]  
callback\_plugins = ./callback\_plugins  
callback\_whitelist = json  
stdout\_callback = json  
show\_custom\_stats = no

I have included json plugin inside the callback\_plugins directory

callback\_plugins admin$ ls  
json.py json.pyc

However when i launch the playbook o/p doesnot appear as json. Any ideas ?

Thanks

---

<div class="post-metadata">

**Author:** ![AlanCoding](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/alancoding/32/301_2.png) [@AlanCoding](https://forum.ansible.com/u/AlanCoding)\
**Post date:** [February 23, 2020, 7:38pm UTC](https://forum.ansible.com/t/custom-callback-plugin-for-awx/32309/2 "2020-02-23T19:38:34Z")

</div>

You could try to SSH into your task container, and install ansible-runner from my custom branch which tries to enable this:

[https://github.com/ansible/ansible-runner/pull/412](https://github.com/ansible/ansible-runner/pull/412)

pip install git+git://[github.com/alancoding/ansible-runner.git@stdout\_callback](http://github.com/alancoding/ansible-runner.git@stdout_callback)

It would be nice to get this into a release soon, but this is all relatively recent.

I’m not a fan of the json stdout callback plugin specifically. It delays all output to the end, and the event data is going to be all screwy because of that, but it should be functional. There are some others which are good, and I’m settled on “selective” as the most useful one practically. I can also see the argument for YAML.

---

<div class="post-metadata">

**Author:** ![Sanoj\_Thampi](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@Sanoj\_Thampi](https://forum.ansible.com/u/Sanoj_Thampi)\
**Post date:** [December 12, 2020, 7:21am UTC](https://forum.ansible.com/t/custom-callback-plugin-for-awx/32309/3 "2020-12-12T07:21:41Z")

</div>

[@arominge@redhat.com](mailto:arominge@redhat.com) Do we need to make any other changes? i installed your custom branch still unable to use call back

---

<div class="post-metadata">

**Author:** ![Sanoj\_Thampi](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@Sanoj\_Thampi](https://forum.ansible.com/u/Sanoj_Thampi)\
**Post date:** [December 15, 2020, 11:52am UTC](https://forum.ansible.com/t/custom-callback-plugin-for-awx/32309/4 "2020-12-15T11:52:02Z")

</div>

can you help here
