
    Vh                     X    d dl mZmZmZ e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
short_description: Runs the discovery program C(facter) on the remote system
description:
  - Runs the C(facter) discovery program (U(https://github.com/puppetlabs/facter)) on the remote system, returning JSON data
    that can be useful for inventory purposes.
deprecated:
  removed_in: 12.0.0
  why: The module has been replaced by M(community.general.facter_facts).
  alternative: Use M(community.general.facter_facts) instead.
extends_documentation_fragment:
  - community.general.attributes
attributes:
  check_mode:
    support: none
  diff_mode:
    support: none
options:
  arguments:
    description:
      - Specifies arguments for facter.
    type: list
    elements: str
requirements:
  - facter
  - ruby-json
author:
  - Ansible Core Team
  - Michael DeHaan
a  
# Example command-line invocation
# ansible www.example.net -m facter

- name: Execute facter no arguments
  community.general.facter:

- name: Execute facter with arguments
  community.general.facter:
    arguments:
      - -p
      - system_uptime
      - timezone
      - is_virtual
N)AnsibleModulec            	      2   t        t        t        ddd                  } | j                  ddg	      }|d
g}| j                  d   r|| j                  d   z  }| j	                  |d      \  }}} | j
                  di t        j                  |       y )NFliststr)requiredtypeelements)	arguments)argument_specfacterz/opt/puppetlabs/bin)opt_dirsz--jsonr   T)check_rc )r   dictget_bin_pathparamsrun_command	exit_jsonjsonloads)modulefacter_pathcmdrcouterrs         l/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/general/plugins/modules/facter.pymainr!   >   s    EG
F %%'( & *K 
!C}}[!v}}[))%%cD%9LBSF'tzz#'    __main__)
__future__r   r   r   r   __metaclass__DOCUMENTATIONEXAMPLESr   ansible.module_utils.basicr   r!   __name__r   r"   r    <module>r*      sB    A @>  4(& zF r"   