Snap Facts

See also: Snap Operations.

snap.SnapBaseFact

host.get_fact(SnapBaseFact)

snap.SnapPackage

host.get_fact(SnapPackage, package)

Returns information for an installed snap package

{
    "name": "lxd",
    "publisher": "Canonical✓",
    "snap-id": "J60k4JY0HppjwOjW8dZdYc8obXKxujRu",
    "channel": "4.0/stable",
    "version": "4.0.9"
}

snap.SnapPackages

host.get_fact(SnapPackages)

Returns a list of installed snap packages:

[
    "core",
    "core18",
    "core20",
    "lxd",
    "snapd"
]