How do I avoid showing skipped Ansible tasks?
I use another way without changing any code:
Ansible use 'default' callback plugin to display output, but you can use 'skippy' callback plugin instead of 'default'. 'skippy' use 'default' except for skipped tasks.
To use 'skipped' plugin, add following line (or uncomment it) in your ansible.cfg file:
stdout_callback = skippy
To localize you ansible.cfg, use command:
ansible --version
If you don't have this file, get example file from ansible sources and copy it in your working folder from where you call ansible.
Now, the skippy
module is deprecated.
Create ansible.cfg
at the root of your project, and add the following instructions:
[defaults]
display_skipped_hosts = no
You can also edit your global configuration file /etc/ansible/ansible.cfg
.