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: //usr/lib/python3.9/site-packages/ansible/utils/__pycache__/galaxy.cpython-39.pyc
a

�)gJ�@s�ddlmZmZmZeZddlZddlZddlm	Z	m
Z
ddlZddlm
ZddlmZddlmZddlmZddlmZddlmZmZe�Zdd
d�Zddd�ZdS)�)�absolute_import�division�print_functionN)�Popen�PIPE)�context)�AnsibleError)�Display)�get_bin_path)�to_text�	to_native�HEADcCst|d||dd�S)N�gitF)�scm�name�version�
keep_scm_meta)�scm_archive_resource)�srcrr�r�8/usr/lib/python3.9/site-packages/ansible/utils/galaxy.py�scm_archive_collection&srrFc
Csdd�}|dvrtd|��zt|�}Wn(tttfyPtd||f��Yn0tjtjd�}|dg}t	j
d}	|	r�|d	kr�|�d
dg�n|dkr�|�d
�|�||g�|||�|d	kr�|r�|dt
|�g}
||
tj�||��tjddtjd�}d}|�rbt�d|||jf�t�|jd��(}
|
jtj�||�|d�Wd�n1�sV0Ynx|dk�r�|ddd|g}|�r�|�d|g�|�|j�n<|d	k�r�|dd|d|jg}|�r�|�|�n
|�d�|du�rt�d|�||tj�||��|jS)Nc
Ss�z(d}d}t||ttd�}|��\}}WnPtyx}z8d�|�}t�d|�td|t|�f��WYd}~n
d}~00|j	dkr�tdd�|�||j	t|�f��dS)N�)�cwd�stdout�stderr� zran %s:zwhen executing %s: %srz0- command %s failed in directory %s (rc=%s) - %s)
rrZcommunicate�	Exception�join�display�debugrr�
returncode)�cmd�tempdirrr�popen�eZranrrr�run_scm_cmd,s
*
z)scm_archive_resource.<locals>.run_scm_cmd)�hgrz#- scm %s is not currently supportedzDcould not find/use %s, it is required to continue with installing %s)�dirZclone�ignore_certsrz-czhttp.sslVerify=falser'z
--insecureZcheckoutFz.tar)�delete�suffixr(ztarring %s from %s to %s�w)Zarcname�archivez--prefixz%s/z-rz--prefix=%s/z--output=%sr
zarchiving %s)rr
�
ValueError�OSError�IOError�tempfileZmkdtemp�CZDEFAULT_LOCAL_TMPrZCLIARGS�extend�appendr�os�pathrZNamedTemporaryFilerZvvvr�tarfile�open�add)rrrrrr&Zscm_pathr#Z	clone_cmdr)Zcheckout_cmdZ	temp_fileZarchive_cmd�tarrrrr*sP



:



r)Nr
)rNr
F)Z
__future__rrr�typeZ
__metaclass__r5r1�
subprocessrrr7Zansible.constantsZ	constantsr2ZansiblerZansible.errorsrZansible.utils.displayr	Z#ansible.module_utils.common.processr
Z+ansible.module_utils.common.text.convertersrrrrrrrrr�<module>s