# Reporting individual packages under apt and with\_items

**URL:** <https://forum.ansible.com/t/reporting-individual-packages-under-apt-and-with-items/15169>\
**Category:** Ansible Project\
**Created:** [May 6, 2014, 2:56pm UTC](https://forum.ansible.com/t/reporting-individual-packages-under-apt-and-with-items/15169 "2014-05-06T14:56:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjwhite0](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mjwhite0](https://forum.ansible.com/u/mjwhite0)\
**Post date:** [May 6, 2014, 2:56pm UTC](https://forum.ansible.com/t/reporting-individual-packages-under-apt-and-with-items/15169/1 "2014-05-06T14:56:51Z")

</div>

I’ve been testing the apt module and with\_items to manage reasonably large (200+) sets of packages. It’s comfortably fast - the packages are iterated within the apt module as a single task - but I miss being able to see which individual packages were updated in a given playbook run.

Is there a way to report on this without having a separate task for each package?

Thanks,  
Mark \<\>\<

---

<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:** [May 6, 2014, 3:23pm UTC](https://forum.ansible.com/t/reporting-individual-packages-under-apt-and-with-items/15169/2 "2014-05-06T15:23:41Z")

</div>

I’m ok with the modules getting modifications to return this.

Something like an array of

{  
installed: ,  
upgraded: ,  
removed:   
}

etc ?

The yum module has a bit better output and we’d want to make strides to keep them the same while not breaking any existing playbooks that used registered values.

---

<div class="post-metadata">

**Author:** ![mjwhite0](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mjwhite0](https://forum.ansible.com/u/mjwhite0)\
**Post date:** [May 7, 2014, 6:06pm UTC](https://forum.ansible.com/t/reporting-individual-packages-under-apt-and-with-items/15169/3 "2014-05-07T18:06:20Z")

</div>

Sounds ideal, yes. I’d wondered about returning a list of tuples with status for each package, but your suggestion is more readable, reducing to empty lists when nothing changed.

I don’t think it’s possible (yet) to have a mixture of latest/absent/present states in a single call - with\_items turns them into separate tasks. But that would be a nice feature in future too, so returning all three lists makes sense.

Thanks,  
Mark \<\>\<
