salt.modules.pkgng

Support for pkgng

salt.modules.pkgng.add(pkg_path)

Install a package from either a local source or remote one

CLI Example::
salt '*' pkgng.add /tmp/package.txz
salt.modules.pkgng.audit()

Audits installed packages against known vulnerabilities

CLI Example::
salt '*' pkgng.audit
salt.modules.pkgng.available_version(name)

The available version of the package in the repository

CLI Example::
salt '*' pkgng.available_version <package name>
salt.modules.pkgng.backup(file_name)

Export installed packages into yaml+mtree file

CLI Example::
salt '*' pkgng.backup /tmp/pkg
salt.modules.pkgng.compare(version1='', version2='')

Compare two version strings. Return -1 if version1 < version2, 0 if version1 == version2, and 1 if version1 > version2. Return None if there was a problem making the comparison.

CLI Example:

salt '*' pkg.compare '0.2.4-0' '0.2.4.1-0'
salt.modules.pkgng.delete(pkg_name)

Delete a package from the database and system

CLI Example::
salt '*' pkgng.delete bash
salt.modules.pkgng.info(pkg=None)

Returns info on packages installed on system

CLI Example::

salt '*' pkgng.info

For individual info

salt '*' pkgng.info sudo

salt.modules.pkgng.install(pkg_name)

Install package from repositories

CLI Example::
salt '*' pkgng.install bash
salt.modules.pkgng.parse_config(file_name='/usr/local/etc/pkg.conf')

Return dict of uncommented global variables.

CLI Example:

salt '*' pkgng.parse_config
*NOTE* not working right
salt.modules.pkgng.restore(file_name)

Reads archive created by pkg backup -d and recreates the database.

salt.modules.pkgng.stats()

Return pkgng stats.

CLI Example::
salt '*' pkgng.stats
salt.modules.pkgng.update()

Refresh PACKAGESITE contents

CLI Example::
salt '*' pkgng.update
salt.modules.pkgng.update_package_site(new_url)

Updates remote package repo url, PACKAGESITE var to be exact.

Must be using http://, ftp://, or https// protos

CLI Example::
salt '*' pkgng.update_package_site http://127.0.0.1/
salt.modules.pkgng.upgrade()

Upgrade all packages

CLI Example::
salt '*' pkgng.upgrade
salt.modules.pkgng.version()

Displays the current version of pkg

CLI Example::
salt '*' pkgng.version

Parent topic

Previous topic

salt.modules.pip

Next topic

salt.modules.pkg_resource