salt.modules.aixpkg

Package support for AIX

Important

If you feel that Salt should be using this module to manage filesets or rpm packages on a minion, and it is using a different module (or gives an error similar to 'pkg.install' is not available), see here.

salt.modules.aixpkg.available_version(*names, **kwargs)

This function is an alias of latest_version.

Return the latest version of the named fileset/rpm package available for upgrade or installation. If more than one fileset/rpm package name is specified, a dict of name/version pairs is returned.

If the latest version of a given fileset/rpm package is already installed, an empty string will be returned for that package.

CLI Example:

salt '*' pkg.latest_version <package name>
salt '*' pkg.latest_version <package1> <package2> <package3> ...

NOTE: Repositories are not presently supported for AIX. This function will always return an empty string for a given fileset/rpm package.

salt.modules.aixpkg.install(name=None, refresh=False, pkgs=None, version=None, test=False, **kwargs)

Install the named fileset(s)/rpm package(s).

name

The name of the fileset or rpm package to be installed.

refresh

Whether or not to update the yum database before executing.

Multiple Package Installation Options:

pkgs

A list of filesets and/or rpm packages to install. Must be passed as a python list. The name parameter will be ignored if this option is passed.

version

Install a specific version of a fileset/rpm package. (Unused at present).

test

Verify that command functions correctly:

Returns a dict containing the new fileset(s)/rpm package(s) names and versions:

{'<package>': {'old': '<old-version>',

'new': '<new-version>'}}

CLI Example:

salt '*' pkg.install /stage/middleware/AIX/bash-4.2-3.aix6.1.ppc.rpm
salt '*' pkg.install /stage/middleware/AIX/bash-4.2-3.aix6.1.ppc.rpm refresh=True
salt '*' pkg.install /stage/middleware/AIX/VIOS2211_update/tpc_4.1.1.85.bff
salt '*' pkg.install /stage/middleware/AIX/Xlc/usr/sys/inst.images/xlC.rte
salt '*' pkg.install /stage/middleware/AIX/Firefox/ppc-AIX53/Firefox.base
salt '*' pkg.install pkgs='["foo", "bar"]'
salt.modules.aixpkg.latest_version(*names, **kwargs)

Return the latest version of the named fileset/rpm package available for upgrade or installation. If more than one fileset/rpm package name is specified, a dict of name/version pairs is returned.

If the latest version of a given fileset/rpm package is already installed, an empty string will be returned for that package.

CLI Example:

salt '*' pkg.latest_version <package name>
salt '*' pkg.latest_version <package1> <package2> <package3> ...

NOTE: Repositories are not presently supported for AIX. This function will always return an empty string for a given fileset/rpm package.

salt.modules.aixpkg.list_pkgs(versions_as_list=False, **kwargs)

List the filesets/rpm packages currently installed as a dict:

{'<package_name>': '<version>'}

CLI Example:

salt '*' pkg.list_pkgs
salt.modules.aixpkg.remove(name=None, pkgs=None, **kwargs)

Remove specified fileset(s)/rpm package(s).

name

The name of the fileset or rpm package to be deleted.

Multiple Package Options:

pkgs

A list of filesets and/or rpm packages to delete. Must be passed as a python list. The name parameter will be ignored if this option is passed.

Returns a list containing the removed packages.

CLI Example:

salt '*' pkg.remove <fileset/rpm package name>
salt '*' pkg.remove tcsh
salt '*' pkg.remove xlC.rte
salt '*' pkg.remove Firefox.base.adt
salt '*' pkg.remove pkgs='["foo", "bar"]'
salt.modules.aixpkg.upgrade_available(name, **kwargs)

Check whether or not an upgrade is available for a given package

CLI Example:

salt '*' pkg.upgrade_available <package name>
salt.modules.aixpkg.version(*names, **kwargs)

Common interface for obtaining the version of installed fileset/rpm package.

CLI Example:

salt '*' pkg.version vim
salt '*' pkg.version foo bar baz