pkgin - Package manager for SmartOS, NetBSD, et al.

Synopsis

  • The standard package manager for SmartOS, but also usable on NetBSD or any OS that uses pkgsrc. (Home: http://pkgin.net/)

Options

parameter required default choices comments
clean
(added in 2.1)
no
  • yes
  • no
Clean packages cache
force
(added in 2.1)
no
  • yes
  • no
Force package reinstall
full_upgrade
(added in 2.1)
no
  • yes
  • no
Upgrade all packages to their newer versions
name
no
Name of package to install/remove;
multiple names may be given, separated by commas
state
no present
  • present
  • absent
Intended state of the package
update_cache
(added in 2.1)
no
  • yes
  • no
Update repository database. Can be run with other steps or on it's own.
upgrade
(added in 2.1)
no
  • yes
  • no
Upgrade main packages to their newer versions

Examples

# 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

Notes

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.

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/pkgin_module.html