Pkg Facts

pkg.PkgPackages

host.get_fact(PkgPackages)

Returns a dict of installed pkg packages:

{
    'package_name': ['version'],
}