We recently upgraded ansible from 2.10 to 2.14 and have noticed ASYNC POLL/OK/FAILED messages are now displayed during async tasks. Where as before these messages where not displayed, is there any way to disable/hide these maessages from stdout?
Example output:
ASYNC POLL on host.fqdn jid=1234.6789 started=1 finished=0
The OK/FAILED messages are similar to the POLL message.
I have tried setting the following callback options in the config file to false, but they either don’t work or they are referenced in some other way.
If anyone knows how to remove these messages, it would be appreciated.
Just a thought, you could use diy callback plugin to this end. I don’t have an example tailored to your needs, but here is one to remove all headers and stats from output:
Thanks for the suggestion, but I’ve actually already tried the diy stdout callback. The irony is that the async poll/ok/failed messages do not display by default using this stdout callback; which is great, however you can not format the results.
have no effect using the diy stdout callback under the [defaults] or [callback_diy] sections in the ansible.cfg file, so reading the errors are a pain.
%ansible python module location% = the python path ansible is using (ansible --version)
By commenting out the “v2_runner_on_async_poll/ok/failed” block sections I managed to remove the (IMO useless) async messages.
The DIY callback currently doesn’t include these async runners and as such does not show these messages, however the DIY callback also doesn’t currently support pretty formatting.
Hence this is why I modified the default callback instead since it was a simple solution and I am not ready to write my own callback just to remove those async messages.
Anyway, hopefully this helps others looking to remove these async messages as well.