DEV Community

Discussion on: Ansible: check if a package is installed on a remote system

Collapse
 
pfuntner profile image
John Pfuntner

Be aware of this requirement for the the package_facts module:

For Debian-based systems python-apt package must be installed on targeted hosts.

Otherwise, ansible_facts.packages is an empty dictionary. Reminder: Ubuntu is Debian-based.