Reporting individual packages under apt and with_items

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 <><

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.

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 <><