community.general.xbps module – Manage packages with XBPS
Note
This module is part of the community.general collection (version 8.6.8).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
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.
Aliases: packaging.os.xbps
Parameters
Parameter |
Comments |
---|---|
Name of the package to install, upgrade, or remove. |
|
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. Choices:
|
|
Desired state of the package. Choices:
|
|
Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step. Choices:
|
|
Whether or not to upgrade whole system Choices:
|
|
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 Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
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: true
- 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: true
- name: Update package cache
community.general.xbps:
update_cache: true
- name: Upgrade packages
community.general.xbps:
upgrade: true
- name: Install a package, failing if the xbps package is out of date
community.general.xbps:
name: foo
state: present
upgrade_xbps: false
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Message about results Returned: success Sample: |
|
Packages that are affected/would be affected Returned: success Sample: |