# how to best report "changed" for a group of tasks

**URL:** <https://forum.ansible.com/t/how-to-best-report-changed-for-a-group-of-tasks/14788>\
**Category:** Ansible Project\
**Created:** [March 16, 2014, 4:34am UTC](https://forum.ansible.com/t/how-to-best-report-changed-for-a-group-of-tasks/14788 "2014-03-16T04:34:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xu\_Chen](https://avatars.discourse-cdn.com/v4/letter/x/958977/32.png) [@Xu\_Chen](https://forum.ansible.com/u/Xu_Chen)\
**Post date:** [March 16, 2014, 4:34am UTC](https://forum.ansible.com/t/how-to-best-report-changed-for-a-group-of-tasks/14788/1 "2014-03-16T04:34:51Z")

</div>

I wonder if there is a way to report “changed” for a group of tasks…

For example, I want to have a play like this:

- include: sub-play1.yml

- include: sub-play2.yml  
“only when something changed in sub-play1”

Or, a play like this:

- hosts: group1  
tasks:

- t1

- t2

- hosts: group2  
tasks: …  
“only when something changed in either t1 or t2 of the previous tasks”

Maybe I can achieve this by getting access to the internal counter of “changed”? Or maybe there is a better way to do this? Thanks…

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [March 16, 2014, 4:28pm UTC](https://forum.ansible.com/t/how-to-best-report-changed-for-a-group-of-tasks/14788/2 "2014-03-16T16:28:24Z")

</div>

Are you saying you might to see the change report on a role-by-role basis?

This could be done with a custom callback plugin, but might take a bit of work.

---

<div class="post-metadata">

**Author:** ![Xu\_Chen](https://avatars.discourse-cdn.com/v4/letter/x/958977/32.png) [@Xu\_Chen](https://forum.ansible.com/u/Xu_Chen)\
**Post date:** [March 16, 2014, 9:35pm UTC](https://forum.ansible.com/t/how-to-best-report-changed-for-a-group-of-tasks/14788/3 "2014-03-16T21:35:36Z")

</div>

Yeah, role-by-role is good enough.

Is there a link to such callback concept? Thanks…
