Only show changed tasks

I usually save the output of my ansible scripts to a log file. There are many times when I wish I could see only the changed tasks. How can I filter out all of the tasks that made no change? All suggestions are welcomed.

Thanks.

The documentation for the default callback plugin may be of interest. You can modify these settings in your ansible.cfg file or using environment variables

[defaults]
display_skipped_hosts = false
display_ok_hosts = false
export ANSIBLE_DISPLAY_SKIPPED_HOSTS=false
export ANSIBLE_DISPLAY_OK_HOSTS=false
ansible-playbook ...

Also, you might also want to take a look at ARA (https://ara.recordsansible.org), it uses an callback plugin to record a lot more information in a searchable, clear reporting tool.

I almost never look at the output of my playbooks, only in ARA and I even run them with --diff (which generally generates even more output).

And you can set up an ARA server in minutes if you use the GitHub - ansible-community/ara-collection: Collection of Ansible roles for ARA Records Ansible. :slight_smile: