salt.modules.snap

Manage snap packages via Salt

depends:snapd for distribution
salt.modules.snap.install(pkg, channel=None, refresh=False)

Install the specified snap package from the specified channel. Returns a dictionary of "result" and "output".

pkg
The snap package name
channel
Optional. The snap channel to install from, eg "beta"
refresh
: False
If True, use "snap refresh" instead of "snap install". This allows changing the channel of a previously installed package.
salt.modules.snap.is_installed(pkg)

Returns True if there is any version of the specified package installed.

pkg
The package name
salt.modules.snap.remove(pkg)

Remove the specified snap package. Returns a dictionary of "result" and "output".

pkg
The package name
salt.modules.snap.versions_installed(pkg)

Query which version(s) of the specified snap package are installed. Returns a list of 0 or more dictionaries.

pkg
The package name