I am trying to list all installed packages on my Debian 7/8/9 machines. There are easy ways dealing with it using apt or dpkg but I could not find a proper way to do this with ansible out of the box.
Is there a nice and smooth way to do this?
For RHEL machines I found this Post: How to get the installed yum packages with Ansible?
It doesn't look like Ansible provides any modules that would support this. You'll have to use
shell
orcommand
.