I use three settings in my ansible.cfg file to hide as much "useless" output as possible.
display_skipped_hosts = False
display_ok_hosts = False
stdout_callback = yaml
Now I have a big playbook where a lot of hosts are involved and each host also skips many roles only needed for other hosts. It looks like this:
- name: an example what my playbook might look like
hosts: many
roles:
- role: admin
when: inventory_hostname == 'admin'
- role: foo
when: "inventory_hostname in groups['bar']"
# ...
This only shows the failed and changed tasks but not the skipped and ok tasks. The problem is that I see a lot of filler lines from the skipped and ok tasks that I can not get rid of:
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.043) 0:00:02.360 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.028) 0:00:02.388 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.025) 0:00:02.413 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.024) 0:00:02.438 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.029) 0:00:02.468 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.025) 0:00:02.493 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.023) 0:00:02.517 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.024) 0:00:02.541 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.024) 0:00:02.566 *******
Tuesday 08 October 2019 14:19:16 +0200 (0:00:00.025) 0:00:02.591 *******
This is bad as it forces me to skroll a lot to find that one line that changed.
Can I get rid of these filler lines as well? How so?