How to change the stdout callback in AWX.

1,672 views
Skip to first unread message

MarcG

unread,
Mar 19, 2018, 9:16:13 PM3/19/18
to AWX Project
Hi, 

I am able to change the stdout callback that is utilised by ansible-playbook within ansible.cfg. I was hoping that, that would follow on through to the AWX gui output but it doesn't. 

I'm still trying to get my head around AWX's architecture, could someone please point me in the right direction as to how this could be achieved?

Many thanks.



Matthew Jones

unread,
Mar 19, 2018, 10:02:17 PM3/19/18
to MarcG, AWX Project
The thing about AWX is that we capture *all* events and stdout and save them to the database... in order to do this we have to bolt on a callback plugin and an output plugin. It's possible that these plugins could co-exist but I'm not so sure.

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/1916eb4e-c625-43cd-99e1-4b65b701773c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Jones
Principal Software Engineer
Ansible Tower

Chris Church

unread,
Mar 20, 2018, 9:28:17 AM3/20/18
to Matthew Jones, MarcG, AWX Project
Like Matt, said, AWX uses a custom stdout callback plugin that's not really intended to be overridden for now. This custom plugin is an integral part of AWX and allows us to capture both the stdout and job event results from ansible-playbook.

Look at https://github.com/ansible/awx/blob/devel/awx/lib/awx_display_callback/module.py for how the current plugin is implemented. At the end of that file, it should be possible to inherit from another display plugin other than the default if you want to experiment with other options, but we don't yet have any plans to make that configurable.


Marcos Georgopoulos

unread,
Mar 20, 2018, 9:28:22 AM3/20/18
to Chris Church, Matthew Jones, AWX Project
Thanks guys,

Much appreciated. 
Reply all
Reply to author
Forward
0 new messages