I found this thread, looking for a similar solution. What worked for me was to set the following under the [defaults] section in my ansible.cfg file:
display_skipped_hosts = False See for more info: http://docs.ansible.com/ansible/intro_configuration.html#display-skipped-hosts On Monday, 23 January 2017 09:53:16 UTC-5, Arjav Shah wrote: > > Tejas, > > 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. > > Thx! > Arjav > > On Monday, June 6, 2016 at 11:26:58 PM UTC-4, Tejas Gadaria wrote: >> >> Thanks for the replay Brian, >> >> 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. >> >> Thanks, >> >> >> On Tuesday, 7 June 2016 08:14:53 UTC+5:30, Brian Coca wrote: >>> >>> 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. >>> >>> >>> ---------- >>> Brian Coca >>> >> -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
