community.general.pkgin (8.5.0) — module

Package manager for SmartOS, NetBSD, et al

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

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

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.
- name: Install package foo
  community.general.pkgin:
    name: foo
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install specific version of foo package
  community.general.pkgin:
    name: foo-2.0.1
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update cache and install foo package
  community.general.pkgin:
    name: foo
    update_cache: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove package foo
  community.general.pkgin:
    name: foo
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove packages foo and bar
  community.general.pkgin:
    name: foo,bar
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update repositories as a separate step
  community.general.pkgin:
    update_cache: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Upgrade main packages (equivalent to pkgin upgrade)
  community.general.pkgin:
    upgrade: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Upgrade all packages (equivalent to pkgin full-upgrade)
  community.general.pkgin:
    full_upgrade: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Force-upgrade all packages (equivalent to pkgin -F full-upgrade)
  community.general.pkgin:
    full_upgrade: true
    force: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Clean packages cache (equivalent to pkgin clean)
  community.general.pkgin:
    clean: true

Inputs

    
name:
    aliases:
    - pkg
    description:
    - Name of package to install/remove;
    - multiple names may be given, separated by commas
    elements: str
    type: list

clean:
    default: false
    description:
    - Clean packages cache
    type: bool

force:
    default: false
    description:
    - Force package reinstall
    type: bool

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

upgrade:
    default: false
    description:
    - Upgrade main packages to their newer versions
    type: bool

full_upgrade:
    default: false
    description:
    - Upgrade all packages to their newer versions
    type: bool

update_cache:
    default: false
    description:
    - Update repository database. Can be run with other steps or on it's own.
    type: bool