
    VhA                     \    d dl mZmZmZ eZdZdZdZd dl	Z	d dl
mZ d Zedk(  r e        yy)	    )absolute_importdivisionprint_functiona  
---
module: rhel_facts
version_added: 1.5.0
short_description: Facts module to set or override RHEL specific facts.
description:
  - Compatibility layer for using the M(ansible.builtin.package) module for rpm-ostree based systems via setting the C(pkg_mgr) fact correctly.
author:
  - Adam Miller (@maxamillion)
requirements:
  - rpm-ostree
seealso:
  - module: ansible.builtin.package
options: {}
ae  
- 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
a6  
ansible_facts:
    description: Relevant Ansible Facts
    returned: when needed
    type: complex
    contains:
        pkg_mgr:
            description: System-level package manager override
            returned: when needed
            type: str
            sample: {'pkg_mgr': 'ansible.posix.rhel_facts'}
N)AnsibleModulec                      t        t               d      } i }t        j                  j	                  d      rd|d<   | j                  |d       y )NT)argument_specsupports_check_modez/run/ostree-bootedzansible.posix.rhel_rpm_ostreepkg_mgrF)ansible_factschanged)r   dictospathexists	exit_json)moduler   s     l/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/ansible/posix/plugins/modules/rhel_facts.pymainr   ;   sK    f F
 M 
ww~~*+#Bi 
=%@    __main__)
__future__r   r   r   type__metaclass__DOCUMENTATIONEXAMPLESRETURNr   ansible.module_utils.basicr   r   __name__ r   r   <module>r       sJ    A @ 
 
 4A  zF r   