Support for YUM
Required python modules: yum, rpm, rpmUtils
Members
The available version of the package in the repository
CLI Example:
salt '*' pkg.available_version <package name>
Cleans local yum metadata.
CLI Example:
salt '*' pkg.clean_metadata
Install the passed package(s)
Return a dict containing the new package names and versions:
{'<package>': {'old': '<old-version>',
'new': '<new-version>']}
CLI Example:
salt '*' pkg.install 'package package package'
List the packages currently installed in a dict:
{'<package_name>': '<version>'}
CLI Example:
salt '*' pkg.list_pkgs
Check whether or not an upgrade is available for all packages
CLI Example:
salt '*' pkg.list_upgrades
Yum does not have a purge, this function calls remove
Return a list containing the removed packages:
CLI Example:
salt '*' pkg.purge <package name>
Since yum refreshes the database automatically, this runs a yum clean, so that the next yum operation will have a clean database
CLI Example:
salt '*' pkg.refresh_db
Removes packages with yum remove
Return a list containing the removed packages:
CLI Example:
salt '*' pkg.remove <package,package,package>
Run a full system upgrade, a yum upgrade
Return a dict containing the new package names and versions:
{'<package>': {'old': '<old-version>',
'new': '<new-version>']}
CLI Example:
salt '*' pkg.upgrade