I am able to hide “skipping” tags under the task header with the help of “display_skipped_hosts” parameter in ansible.cfg file. However TASK is still displayed on the console.
I updated ansible.cfg file with “stdout_callback = skippy” however this plugin is hiding only notification tags “skipping”. It is not hiding “TASK” header.
task headers get printed before a task gets attempted for any of the hosts, the callback hides the skipped hosts but cannot ‘unprint’ the headers if all hosts skip the task.
The only way to do that would be to buffer the output and wait until all hosts skip.
So If I understood correctly, In order to achieve this, I need to write custom “callback_plugins” which can buffer the output until all hosts skip in the playbook.
If answer is positive, I will try this out ans update.
Did you attempt writing a module which buffers output and only prints header if task is not skipped. If yes, would be great if you can provide me some pointers.