community.general.xbps – Manage packages with XBPS

From Get docs
Ansible/docs/2.10/collections/community/general/xbps module


community.general.xbps – Manage packages with XBPS

Note

This plugin is part of the community.general collection (version 1.3.2).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.xbps.


Synopsis

  • Manage packages with the XBPS package manager.

Parameters

Parameter Choices/Defaults Comments

force

boolean

  • no

  • yes

This option doesn't have any effect and is deprecated, it will be removed in 3.0.0.

name

list / elements=string

Name of the package to install, upgrade, or remove.


aliases: pkg, package

recurse

boolean

  • no

  • yes

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.

state

string

  • present

  • absent
  • latest
  • installed
  • removed

Desired state of the package.

update_cache

boolean

  • no
  • yes

Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step.


aliases: update-cache

upgrade

boolean

  • no

  • yes

Whether or not to upgrade whole system

upgrade_xbps

boolean

added in 0.2.0 of community.general

  • no
  • yes

Whether or not to upgrade the xbps package when necessary. Before installing new packages, xbps requires the user to update the xbps package itself. Thus when this option is set to no, upgrades and installations will fail when xbps is not up to date.



Examples

- name: Install package foo (automatically updating the xbps package if needed)
  community.general.xbps: name=foo state=present

- name: Upgrade package foo
  community.general.xbps: name=foo state=latest update_cache=yes

- name: Remove packages foo and bar
  community.general.xbps: name=foo,bar state=absent

- name: Recursively remove package foo
  community.general.xbps: name=foo state=absent recurse=yes

- name: Update package cache
  community.general.xbps: update_cache=yes

- name: Upgrade packages
  community.general.xbps: upgrade=yes

- name: Install a package, failing if the xbps package is out of date
  community.general.xbps:
    name: foo
    state: present
    upgrade_xbps: no

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description

msg

string

success

Message about results


Sample:

System Upgraded

packages

list / elements=string

success

Packages that are affected/would be affected


Sample:

['ansible']




Authors

  • Dino Occhialini (@dinoocch)
  • Michael Aldridge (@the-maldridge)

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