ansible.posix.rhel_facts module – Facts module to set or override RHEL specific facts.
This module is part of the ansible.posix collection (version 1.5.4).
You might already have this collection installed if you are using the
It is not included in
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:
New in ansible.posix 1.5.0
Compatibility layer for using the “package” module for rpm-ostree based systems via setting the “pkg_mgr” fact correctly.
The below requirements are needed on the host that executes this module.
Generic OS package manager.
- name: Playbook to use the package module on all RHEL footprints
- setup # REQUIRED to be run before all custom fact modules
- name: Ensure packages are installed
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.
System-level package manager override
Returned: when needed