- Docs »
- pkgin - Package manager for SmartOS, NetBSD, et al.
-
You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
pkgin - Package manager for SmartOS, NetBSD, et al.
- The standard package manager for SmartOS, but also usable on NetBSD or any OS that uses
pkgsrc
. (Home: http://pkgin.net/)
Parameter |
Choices/Defaults |
Comments |
clean
bool
(added in 2.1) |
|
Clean packages cache
|
force
bool
(added in 2.1) |
|
Force package reinstall
|
full_upgrade
bool
(added in 2.1) |
|
Upgrade all packages to their newer versions
|
name
|
|
Name of package to install/remove;
multiple names may be given, separated by commas
|
state
|
Choices:
present ←
- absent
|
Intended state of the package
|
update_cache
bool
(added in 2.1) |
|
Update repository database. Can be run with other steps or on it's own.
|
upgrade
bool
(added in 2.1) |
|
Upgrade main packages to their newer versions
|
Note
- Known bug with pkgin < 0.8.0: if a package is removed and another package depends on it, the other package will be silently removed as well. New to Ansible 1.9: check-mode support.
# install package foo
- pkgin:
name: foo
state: present
# Update database and install "foo" package
- pkgin:
name: foo
update_cache: yes
# remove package foo
- pkgin:
name: foo
state: absent
# remove packages foo and bar
- pkgin:
name: foo,bar
state: absent
# Update repositories as a separate step
- pkgin:
update_cache: yes
# Upgrade main packages (equivalent to C(pkgin upgrade))
- pkgin:
upgrade: yes
# Upgrade all packages (equivalent to C(pkgin full-upgrade))
- pkgin:
full_upgrade: yes
# Force-upgrade all packages (equivalent to C(pkgin -F full-upgrade))
- pkgin:
full_upgrade: yes
force: yes
# clean packages cache (equivalent to C(pkgin clean))
- pkgin:
clean: yes
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
- Larry Gilbert (L2G)
- Shaun Zinck (@szinck)
- Jasper Lievisse Adriaanse (@jasperla)
Hint
If you notice any issues in this documentation you can edit this document to improve it.