
    Vh                     \    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: facter_facts
short_description: Runs the discovery program C(facter) on the remote system and return Ansible facts
version_added: 8.0.0
description:
  - Runs the C(facter) discovery program (U(https://github.com/puppetlabs/facter)) on the remote system, returning Ansible
    facts from the JSON data that can be useful for inventory purposes.
extends_documentation_fragment:
  - community.general.attributes
  - community.general.attributes.facts
  - community.general.attributes.facts_module
options:
  arguments:
    description:
      - Specifies arguments for facter.
    type: list
    elements: str
requirements:
  - facter
  - ruby-json
author:
  - Ansible Core Team
  - Michael DeHaan
z
- name: Execute facter no arguments
  community.general.facter_facts:

- name: Execute facter with arguments
  community.general.facter_facts:
    arguments:
      - -p
      - system_uptime
      - timezone
      - is_virtual
z
ansible_facts:
  description: Dictionary with one key C(facter).
  returned: always
  type: dict
  contains:
    facter:
      description: Dictionary containing facts discovered in the remote system.
      returned: always
      type: dict
N)AnsibleModulec                  F   t        t        t        dd            d      } | j                  ddg	      }|d
g}| j                  d   r|| j                  d   z  }| j	                  |d      \  }}}| j                  t        t        j                  |                   y )Nliststr)typeelements)	argumentsT)argument_specsupports_check_modefacterz/opt/puppetlabs/bin)opt_dirsz--jsonr   )check_rc)r   )ansible_facts)r   dictget_bin_pathparamsrun_command	exit_jsonjsonloads)modulefacter_pathcmdrcouterrs         r/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/general/plugins/modules/facter_facts.pymainr!   C   s    7
 !	F %%'( & *K 
!C}}[!v}}[))%%cD%9LBS
4tzz##?@    __main__)
__future__r   r   r   r
   __metaclass__DOCUMENTATIONEXAMPLESRETURNr   ansible.module_utils.basicr   r!   __name__ r"   r    <module>r,      sJ    A @2

  4A( zF r"   