ansible.posix.rhel_facts (1.5.4) — module

Facts module to set or override RHEL specific facts.

| "added in version" 1.5.0 of ansible.posix"

Authors: Adam Miller (@maxamillion)

Install collection

Install with ansible-galaxy collection install ansible.posix:==1.5.4


Add to requirements.yml

  collections:
    - name: ansible.posix
      version: 1.5.4

Description

Compatibility layer for using the "package" module for rpm-ostree based systems via setting the "pkg_mgr" fact correctly.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Outputs

ansible_facts:
  contains:
    pkg_mgr:
      description: System-level package manager override
      returned: when needed
      sample:
        pkg_mgr: ansible.posix.rhel_facts
      type: str
  description: Relevant Ansible Facts
  returned: when needed
  type: complex

See also