HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //lib/python3.9/site-packages/ansible/plugins/action/__pycache__/assemble.cpython-39.pyc
a

�)g��@s�ddlmZmZmZeZddlZddlZddlZddl	Z	ddl
Z
ddlmZ
ddlmZmZmZmZddlmZmZddlmZddlmZddlmZGd	d
�d
e�ZdS)�)�absolute_import�division�print_functionN)�	constants)�AnsibleError�
AnsibleAction�_AnsibleActionDone�AnsibleActionFail)�	to_native�to_text)�boolean)�
ActionBase)�
checksum_scs,eZdZdZddd�Zd	�fdd�	Z�ZS)
�ActionModuleTNFc	Cs<tjtjd�\}}t�|d�}d}	d}
dd�tt�|��D�D]�}|rR|�|�sRq>d||f}tj	�
|�r>|r�tj	�|��d�r�q>t
|jj||d�d	��}
|
��}Wd
�n1s�0Y|
r�|�d�|	�r
|�r
t�|�d}|�|�|d
dk�r
|�d�|�|�d}	|�d��r*d}
q>d}
q>|��|S)z/ assemble a file from a directory of fragments )�dir�wbFcss|]}t|dd�VqdS)Zsurrogate_or_strict)�errorsN)r)�.0�p�r�C/usr/lib/python3.9/site-packages/ansible/plugins/action/assemble.py�	<genexpr>0�z8ActionModule._assemble_from_fragments.<locals>.<genexpr>z%s/%s�.)�decrypt�rbN�
r���T)�tempfileZmkstemp�CZDEFAULT_LOCAL_TMP�os�fdopen�sorted�listdir�search�path�isfile�basename�
startswith�openZ_loaderZ
get_real_file�read�write�codecs�
escape_decode�endswith�close)�selfZsrc_path�	delimiterZcompiled_regexp�
ignore_hiddenrZtmpfdZ	temp_path�tmpZ
delimit_meZadd_newline�f�fragmentZfragment_fhZfragment_contentrrr�_assemble_from_fragments(s6"&



z%ActionModule._assemble_from_fragmentsc
s�d|_tt|��||�}~|dur(t�}|jj�dd�}|jj�dd�}|jj�dd�}|jj�dd�}|jj�dd�}|jj�dd�}	|jj�d	d�}
|jj�d
d�}�z�z�|dus�|dur�t	d��t
|dd
�r�|�|jd|d��t
��nDz|�d|�}Wn2t�y2}zt	t|���WYd}~n
d}~00tj�|��sNt	d|��d}
|du�rft�|�}
|�|||
|
|�}t|�}|�|�}|j|||	d�}i}|jj��}dD]}||v�r�||=�q�||d<||dk�rd|jj�r�|�|||�}|jj� |jjj!d�}|�"||�}|�#|jjj!|f�|�t|d��|jd||d�}|�rX||d<|�|�n|�|jd||d��Wn2t$�y�}z|�|j%�WYd}~n
d}~00W|�&|jjj!�n|�&|jjj!�0|S)NF�src�destr1�
remote_srcZyes�regexp�followr2rTzsrc and dest are required)�strictzansible.legacy.assemble)�module_name�	task_vars�fileszSource (%s) is not a directory)Zall_varsr;)r9r:r1r2rZchecksum)r7zansible.legacy.copy)r=Zmodule_argsr>�diffzansible.legacy.file)'Z_supports_check_mode�superr�run�dictZ_task�args�get�popr	r�updateZ_execute_modulerZ_find_needlerr
r r%�isdir�re�compiler6rZ_remote_expand_userZ_execute_remote_stat�copyZ
_play_contextr@Z_get_diff_dataZ_connectionZ_shellZ	join_pathZtmpdirZ_transfer_fileZ
_fixup_perms2r�resultZ_remove_tmp_path)r0r3r>rLr7r8r1r9r:r;r2r�e�_rer%Z
path_checksumZ	dest_statr@Znew_module_args�optZremote_pathZxfered�res��	__class__rrrBSsl"





$$zActionModule.run)NNFT)NN)�__name__�
__module__�__qualname__ZTRANSFERS_FILESr6rB�
__classcell__rrrQrr$s
+r)Z
__future__rrr�typeZ
__metaclass__r,r Zos.pathrIrZansiblerrZansible.errorsrrrr	Zansible.module_utils._textr
rZ)ansible.module_utils.parsing.convert_boolrZansible.plugins.actionr
Zansible.utils.hashingrrrrrr�<module>s