Salt can manage software packages via the pkg state module, packages can be set up to be installed, latest, removed and purged. Package management declarations are typically rather simple:
vim:
pkg.installed
Members
Verify that the package is installed, and only that it is installed. This state will not upgrade an existing package and only verify that it is installed
Usage:
httpd:
pkg:
- installed
- repo: mycustomrepo
- skip_verify: True
- version: 2.0.6~ubuntu3
Verify that the named package is installed and the latest available package. If the package can be updated this state function will update the package. Generally it is better for the installed function to be used, as latest will update the package whenever a new package is available.
Refresh the package database here so that it only needs to happen once