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

Manage packages with XBPS

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

Authors: Dino Occhialini (@dinoocch), Michael Aldridge (@the-maldridge)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manage packages with the XBPS package manager.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Install package foo
- xbps: name=foo state=present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Upgrade package foo
- xbps: name=foo state=latest update_cache=yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Remove packages foo and bar
- xbps: name=foo,bar state=absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Recursively remove package foo
- xbps: name=foo state=absent recurse=yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Update package cache
- xbps: update_cache=yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Upgrade packages
- xbps: upgrade=yes

Inputs

    
name:
    description:
    - Name of the package to install, upgrade, or remove.

state:
    choices:
    - present
    - absent
    - latest
    default: present
    description:
    - Desired state of the package.

recurse:
    default: 'no'
    description:
    - When removing a package, also remove its dependencies, provided that they are not
      required by other packages and were not explicitly installed by a user.
    type: bool

upgrade:
    default: 'no'
    description:
    - Whether or not to upgrade whole system
    type: bool

update_cache:
    default: 'yes'
    description:
    - Whether or not to refresh the master package lists. This can be run as part of a
      package installation or as a separate step.
    type: bool

Outputs

msg:
  description: Message about results
  returned: success
  sample: System Upgraded
  type: str
packages:
  description: Packages that are affected/would be affected
  returned: success
  sample:
  - ansible
  type: list