%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/plugins/action/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/plugins/action/__pycache__/gather_facts.cpython-39.pyc

a

�)g5�@sxddlmZmZmZeZddlZddlZddlm	Z
ddlmZddl
mZddlmZddlmZGdd	�d	e�ZdS)
�)�absolute_import�division�print_functionN)�	constants)�get_action_args_with_defaults)�boolean)�
ActionBase)�
merge_hashcs.eZdZdd�Zdd�Zd�fdd�	Z�ZS)	�ActionModulec	Cs&|jj��}|tjvr�z|jj�d�}Wn$tyL|jj	�
d�d}Yn0|dvr�|�dd�}|ddgfvr�|j�
d||f�|�dd�}|dur�|j�
d	||f�|�d
d�}|dur�|j�
d||f�tdd
�|��D��}|jjj||jjd�j}t|||jj|j|jjjjd�}|S)Nzansible.netcommon.�.���)Znetwork_cliZhttpapiZnetconfZ
gather_subset�allzIgnoring subset(%s) for %sZgather_timeoutzIgnoring timeout(%s) for %s�filterzIgnoring filter(%s) for %scss"|]\}}|dur||fVqdS)N�)�.0�k�vrr�G/usr/lib/python3.9/site-packages/ansible/plugins/action/gather_facts.py�	<genexpr>.�z0ActionModule._get_module_args.<locals>.<genexpr>)Zcollection_list)Z
action_groups)�_task�args�copy�CZ
_ACTION_SETUP�_connection�ansible_name�removeprefix�AttributeErrorZ
_load_name�split�pop�_displayZwarning�dict�itemsZ_shared_loader_objZ
module_loaderZfind_plugin_with_context�collectionsZ
resolved_fqcnrZmodule_defaultsZ_templarZ_parentZ_play�_action_groups)	�self�fact_module�	task_vars�mod_args�nameZsubset�timeoutZfact_filterZresolved_fact_modulerrr�_get_module_argss2
�
�zActionModule._get_module_argscCs2|�di�|�dg�|�dg�d�}t||dd�S)N�
ansible_facts�warnings�deprecations)r,r-r.Z	append_rp)Z
list_merge)�getr	)r%�resultZtask_resultZfiltered_resrrr�_combine_task_result<s



�z!ActionModule._combine_task_resultNc
s�d|_tt|��||�}i|d<ttjjd|d��}|�d|j	j
�dd��}d|vr�tjjd|d�}|j	j
�d	|�d
|�di��d	���}|�|�|p�|j
jd�g�|�|�d��i}i}	|dur�t|�dkr�d}nt|�}|�r\|D]^}
|�|
|�}|j|
||d
d�}|�dd
��r$|||
<q�|�dd
��r<||	|
<q�|�||�}q�|�|j
jj�n�i}
|D]8}
|�|
|�}|j�d|
�|j|
||dd�|
|
<�qd|
�rX|
D]�}|
|dtj�|
|d�d�}|jd||d
d�}|�dd�dk�r<|�dd
��r
|||<n$|�dd
��r"||	|<n|�||�}|
|=�q�n
t�d��q�t�d��q�|	�r�dd�|	� ��|d<|	|d<t|	�t|�k�r�d|d<|�r�d|d<dd�|� ��|d<||d<d|dd <d|d!<|S)"NTr,Z
FACTS_MODULES)Z	variablesZansible_facts_parallel�parallelZsmartZCONNECTION_FACTS_MODULES�
network_osZansible_network_oszansible.legacy.setup�F)Zmodule_nameZmodule_argsr'Z
wrap_async�failed�skippedz
Running %sZansible_job_idZresults_file)ZjidZ
_async_dirzansible.legacy.async_status�finishedrg�������?g�?z'The following modules were skipped: %s
z, �msgZskipped_modulesz,The following modules failed to execute: %s
Zfailed_modulesZ_ansible_facts_gatheredZ_ansible_verbose_override)!Z_supports_check_mode�superr
�run�listrZconfigZget_config_valuerrrr/�extendrr�index�lenrr+Z_execute_moduler1Z_remove_tmp_pathZ_shellZtmpdirr Zvvvv�os�path�dirname�time�sleep�join�keys)r%�tmpr'r0�modulesr2Zconnection_mapr3r5r6r&r(�resZjobs�moduleZ	poll_args��	__class__rrr:Fsp&

"

zActionModule.run)NN)�__name__�
__module__�__qualname__r+r1r:�
__classcell__rrrJrr
s)
r
)Z
__future__rrr�typeZ
__metaclass__r?rBZansiblerrZansible.executor.module_commonrZ)ansible.module_utils.parsing.convert_boolrZansible.plugins.actionrZansible.utils.varsr	r
rrrr�<module>s

Zerion Mini Shell 1.0