Any change concerning the stdout callback in AWX?

Nearly a year ago, MarcG posted to this forum the message titled “How to change the stdout callback in AWX”. In it, he asked how can we change the stdout callback that determines how text from stdout appears
under the AWX gui output (the job output)?

The answer at the time was "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. 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.”

That phrase “for now” jumps out. Has there been any change in the status of this?

Is there an outstanding bug or feature request documented somewhere on this?

I know that from customer to customer, improving the formatting of playbook output is consistently a subject that comes up early and often.

  1. Third-party web interfaces that display Ansible engine stdout do not exhibit this problem (e.g. Jenkins). To potential Tower purchasers, crappy job output can be a show-stopper. The value proposition of Tower is that it doesn’t take high-value technical expertise to use job templates to launch jobs. This value is diluted if job output is ugly or difficult to understand.

  2. Tools have been available for quite a few years that dup file descriptors in order to direct output to two different places (e.g. tee). It isn’t rocket science. Why can’t Tower or AWX send job output to a database and to Tower/AWX gui, with the former happening by way of the built-in custom callback and the latter by way of pluggable stdout callbacks?

Surely it is no longer the case that there is still no way to improve the format job output under Tower or AWX. I’m optimistic that this has either already been addressed (please enlighten me how to do it!) or will be addressed at some point in the not-too-distant future.

We know we can download job output. We might consider at some point writing some code that mines the raw output to produce reports that are easier on the eyes, if necessary. Absent better solutions (the ability to override the AWX/Tower stdout callback plugin), do you have any suggestions about automating the process of post-processing raw job output to make it easier on the eyes? Maybe there might be ways to reuse existing stdout callback plugin functionality in that context.

Thank you for any light you can shed on this.

Cheers,
wutufubapoobah

wutufubapoobah,

We haven’t made any notable changes to this in recent history. It’s mostly a side effect of the fact that in an Ansible playbook run, you can only have one callback plugin defined as “the stdout plugin”:

https://docs.ansible.com/ansible/latest/plugins/callback.html#managing-stdout

…and the goal of our callback plugin isn’t just to capture and store stdout - we capture events and store them in the database so that we can query them for a number of functional purposes in AWX (e.g., “how many hosts in this job run skipped Task XYZ?”). So in order to expand upon the stdout callback plugin in AWX itself, we’d likely have to implement some additional pluggable mechanism for sending a copy of the data. If you’re wanting to process the raw event data yourself, all of this data is discoverable via the AWX API at https://your-awx.example.org/api/v2/jobs/N/job_events/

Surely it is no longer the case that there is still no way to improve the format job output under Tower or AWX

What specifically are you looking to improve about the output format? The primary goal of AWX’s stdout display is to represent the data as closely as possible to the way it would display if you ran ansible-playbook by hand. The events API mentioned above is available if you’d like to compose a customized stdout display yourself.