ansible.builtin.pkgin (v2.9.27) — module

Package manager for SmartOS, NetBSD, et al.

| "added in version" 1.0 of ansible.builtin"

Authors: Larry Gilbert (@L2G), Shaun Zinck (@szinck), Jasper Lievisse Adriaanse (@jasperla)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# install package foo
- pkgin:
    name: foo
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Update database and install "foo" package
- pkgin:
    name: foo
    update_cache: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# remove package foo
- pkgin:
    name: foo
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# remove packages foo and bar
- pkgin:
    name: foo,bar
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Update repositories as a separate step
- pkgin:
    update_cache: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Upgrade main packages (equivalent to C(pkgin upgrade))
- pkgin:
    upgrade: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Upgrade all packages (equivalent to C(pkgin full-upgrade))
- pkgin:
    full_upgrade: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Force-upgrade all packages (equivalent to C(pkgin -F full-upgrade))
- pkgin:
    full_upgrade: yes
    force: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# clean packages cache (equivalent to C(pkgin clean))
- pkgin:
    clean: yes

Inputs

    
name:
    description:
    - Name of package to install/remove;
    - multiple names may be given, separated by commas

clean:
    default: 'no'
    description:
    - Clean packages cache
    type: bool
    version_added: '2.1'
    version_added_collection: ansible.builtin

force:
    default: 'no'
    description:
    - Force package reinstall
    type: bool
    version_added: '2.1'
    version_added_collection: ansible.builtin

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Intended state of the package

upgrade:
    default: 'no'
    description:
    - Upgrade main packages to their newer versions
    type: bool
    version_added: '2.1'
    version_added_collection: ansible.builtin

full_upgrade:
    default: 'no'
    description:
    - Upgrade all packages to their newer versions
    type: bool
    version_added: '2.1'
    version_added_collection: ansible.builtin

update_cache:
    default: 'no'
    description:
    - Update repository database. Can be run with other steps or on it's own.
    type: bool
    version_added: '2.1'
    version_added_collection: ansible.builtin