apt — Apt packages

The apt check searches the local Apt package database, and asserts that packages are installed or missing.


Check that a package is installed:

package = 'ufw'

Check that a particular version is installed:

package = 'tmux'
version = '2.8-3'

Check that a package is not installed:

package = 'httpd'
state = 'missing'

List of parameters

packagestringName of the package.
statestringState of the package. This can be 'present' or 'missing'.
versionstringIf installed, the version that should be present.