rhel_rpm_ostree¶
Collection Note
This module is part of the ansible.posix collection. To install the collection, use:
Added in version1.5.0.
You need further requirements to be able to use this module, see the Requirements section for details.
Synopsis¶
- Compatibility layer for using the "package" module for RHEL for Edge systems utilizing the RHEL System Roles.
Requirements¶
The following Python packages are needed on the host that executes this module:
Parameters¶
| Parameter | Defaults / Choices | Comments |
|---|---|---|
| name list / elements=str |
A package name or package specifier with version, like V(name-1.0). Comparison operators for package version are valid here C(>), C(<), C(>=), C(<=). Example - C(name>=1.0). If a previous version is specified, the task also needs to turn C(allow_downgrade) on. See the C(allow_downgrade) documentation for caveats with downgrading packages. When using O(state=latest), this can be V('*') which means run C(yum -y update). You can also pass a url or a local path to a rpm file (using O(state=present)). To operate on several packages this can accept a comma separated string of packages or (as of 2.0) a list of packages. |
|
| state str |
Choices: absent, installed, latest, present, removed | Whether to install (V(present) or V(installed), V(latest)), or remove (V(absent) or V(removed)) a package. V(present) and V(installed) will simply ensure that a desired package is installed. V(latest) will update the specified package if it's not of the latest available version. V(absent) and V(removed) will remove the specified package. Default is C(null), however in effect the default action is V(present) unless the C(autoremove) option is enabled for this module, then V(absent) is inferred. |
Notes¶
Note
- This module does not support installing or removing packages to/from an overlay as this is not supported by RHEL for Edge, packages needed should be defined in the osbuild Blueprint and provided to Image Builder at build time. This module exists only for C(package) module compatibility.
Examples¶
- name: Ensure htop and ansible are installed on rpm-ostree based RHEL
ansible.posix.rhel_rpm_ostree:
name:
- htop
- ansible
state: present
Return Values¶
| Key | Data Type | Description | Returned |
|---|---|---|---|
| msg | str | status of rpm transaction | always |
Authors¶
- Adam Miller (@maxamillion)