ansible.posix.rhel_facts module – Facts module to set or override RHEL specific facts.
Note
This module is part of the ansible.posix collection (version 1.6.2).
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 ansible.posix
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: ansible.posix.rhel_facts
.
New in ansible.posix 1.5.0
Synopsis
Compatibility layer for using the ansible.builtin.package module for rpm-ostree based systems via setting the
pkg_mgr
fact correctly.
Requirements
The below requirements are needed on the host that executes this module.
rpm-ostree
See Also
See also
- ansible.builtin.package
Generic OS package manager.
Examples
- name: Playbook to use the package module on all RHEL footprints
vars:
ansible_facts_modules:
- setup # REQUIRED to be run before all custom fact modules
- ansible.posix.rhel_facts
tasks:
- name: Ensure packages are installed
ansible.builtin.package:
name:
- htop
- ansible
state: present
Returned Facts
Facts returned by this module are added/updated in the hostvars
host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
Key |
Description |
---|---|
System-level package manager override Returned: when needed Sample: |