Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/galaxy/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/galaxy/role.pyc

�
�Udac@`s#ddlmZmZmZeZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZddlmZddlmZddlmZddlmZmZdd	lmZdd
lmZddlmZe�Zde fd
��YZ!dS(i(tabsolute_importtdivisiontprint_functionN(tLooseVersion(trmtree(tcontext(tAnsibleError(t
user_agent(t	to_nativetto_text(topen_url(tRoleRequirement(tDisplayt
GalaxyRolecB`s�eZeddg�Zejjdd�ejjdd�fZejjdd�ZdZ	ddddd
�Zd�Zd�Z
ed��Zed��Zd�Zd�Zd�Zd�Zed��ZRS(tgitthgtmetasmain.ymls	main.yamls.galaxy_install_infotdefaultstfilesthandlersttaskst	templatestvarsttestsc
C`s�d|_d|_tjd|_tjd|j�||_||_	||_
||_|pd||_||_
|dk	r!|jtjjtjj|j
��s�tjj||j
�}nTxQ|jD]F}tjjtjj|||��r�tjj||j
�}Pq�q�W||_nrtjj|jd|j
�|_g|jD]}	|	^qM|_g|jD]}	tjj|	|j
�^ql|_dS(Ntignore_certssValidate TLS certificates: %si(tNonet	_metadatat
_install_infoRtCLIARGSt_validate_certstdisplaytdebugtgalaxytapitnametversiontsrctscmtendswithtostpathtjointsept	META_MAINtexiststroles_pathstpaths(
tselfR R!R"R$R#R%R(t	meta_maintx((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pyt__init__4s*							'$"cC`s(|jrd|j|jfS|jSdS(sj
        Returns "rolename (version)" if version is not null
        Returns "rolename" otherwise
        s%s (%s)N(R#R"(R/((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pyt__repr__Ys	cC`s|j|jkS(N(R"(R/tother((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pyt__eq__cscC`s�|jdkr�x�|jD]�}tjj|j|�}tjj|�rzRy%t|d�}tj	|�|_Wn&t
k
r�tjd|j
�tSXWd|j�XqqWn|jS(s'
        Returns role metadata
        trsUnable to load metadata for %sN(RRR+R'R(R)tisfiletopentyamlt	safe_loadt	ExceptionRtvvvvvR"tFalsetclose(R/R0t	meta_pathtf((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pytmetadatafs
	cC`s�|jdkr�tjj|j|j�}tjj|�r�zRy%t|d�}tj	|�|_Wn&t
k
r�tjd|j
�tSXWd|j�Xq�n|jS(s+
        Returns role install info
        R6s)Unable to load Galaxy install info for %sN(RRR'R(R)tMETA_INSTALLR7R8R9R:R;RR<R"R=R>(R/t	info_pathR@((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pytinstall_infozs
	c	C`s�td|jdtjj�jd��}tjjtjj|jd��sptj	tjj|jd��ntjj|j|j
�}t|d��5}ytj
||�|_Wntk
r�tSXWdQXtS(s�
        Writes a YAML-formatted file to the role's meta/ directory
        (named .galaxy_install_info) which contains some information
        we can use later for commands like 'list' and 'info'.
        R#tinstall_dates%cRsw+N(tdictR#tdatetimetutcnowtstrftimeR'R(R,R)tmakedirsRBR8R9t	safe_dumpRR;R=tTrue(R/tinfoRCR@((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pyt_write_galaxy_install_info�s	$"
cC`s9|jr5yt|j�tSWq5tk
r1q5XntS(s�
        Removes the specified role from the roles path.
        There is a sanity check to make sure there's a meta/main.yml file at this
        path so the user doesn't blow away random directories.
        (RARR(RLR;R=(R/((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pytremove�s	

cC`s|rd|kr?d|kr?d|d|d|jf}n	|j}tjd|�ywt|d|jdt��}tjdt�}|j	�}x#|r�|j
|�|j	�}q�W|j�|jSWqt
k
r�}tjdt|��qXntS(	sS
        Downloads the archived role to a temp location based on role data
        tgithub_usertgithub_repos*https://github.com/%s/%s/archive/%s.tar.gzs- downloading role from %stvalidate_certst
http_agenttdeleteufailed to download the file: %s(R#R$RR
RRttempfiletNamedTemporaryFileR=treadtwriteR>R"R;terrorR	(R/t	role_datatarchive_urlturl_filet	temp_filetdatate((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pytfetch�s"!		

cC`s�|jr+tjdtjd|j�}n}|jr�tjj	|j�rU|j}q�d|jkr|j}|j
|�}q�|jj|j�}|s�t
d|j|jjf��n|jd�dkr�tjd|j�n|jjd|d�}|js�t|�d	kr�g|D]}t|jd
d��^q#}y|j�Wn@tk
r�t
ddjg|D]}|j^qx���nXt|d
�|_qJ|jdd�r�|d|_qJd|_nn|jdkrJ|rJt|j�g|D]}|jd
d�^qkrJt
d|j|j|f��qJnx=|D]5}|d
|jkrQd|krQ|d|_qQqQW|j
|�}nt
d��|r�tjd|�tj|�s�t
d��q�tj |d�}d}	|j!�}
x�|
D]�}x�|j"D]u}||jkrtjj#tjj#|j��}
|	sc|
}|}	q�t|
�t|�kr�|
}|}	q�qqWqW|	s�t
d��n?yt$j%|j&|	��|_'Wnt(k
r�t
d��nXt)}xj|s[tjd|j|jf�y�tjj*|j�r�tjj+|j�sQt
d��q�tjjdt)�s|t
d|j��q�|j,�s�t
d|j��q�ntj-|j�x�|
D]�}|j.�s�|j/�r�t0|j�}t0|�}|j1|dd�j2tj3�}g}xB|D]:}|dkrd |krd!|kr|j4|�qqWtjj|�|_|j5|t0|j��q�q�W|j6�t7}Wq�t8k
rW}t7}|j9t9j:kr,t|j;�dkr,|j;j<|j�}t|j;�|kr,|j;|d|_t)}q,n|rXt
d"|jt0|�f��qXq�Xq�Wtjd#t=|��|jo�tjj	|j�s�ytj>|�Wq�t8t?fk
r�}tjd$|t|�f�q�Xnt7Snt)S(%Nt
keep_scm_metas://s - sorry, %s was not found on %s.t	role_typetAPPsP%s is a Container App role, and should only be installed using Ansible ContainertversionstidiR"s�Unable to compare role versions (%s) to determine the most recent version due to incompatible version formats. Please contact the role author to resolve versioning conflicts, or specify an explicit role version to install.s, i����t
github_branchtmastersX- the specified version (%s) of %s was not found in the list of available versions (%s).tsourcesNo valid role data foundsinstalling from %ss>the downloaded file does not appear to be a valid tar archive.R6s7this role does not appear to have a meta/main.yml file.s=this role does not appear to have a valid meta/main.yml file.s- extracting %s to %ss7the specified roles path exists and is not a directory.tforcesJthe specified role %s appears to already exist. Use --force to replace it.su%s doesn't appear to contain a role.
  please remove this directory manually if you really want to put the role here.tis..t~t$s Could not update files in %s: %ss- %s was installed successfullyu"Unable to remove tmp file (%s): %s(@R%Rtscm_archive_roleRRtspecR$R'R(R7R`R!tlookup_role_by_nameRt
api_servertgetRtwarningR"tfetch_role_relatedR#tlenRRtsortt	TypeErrorR)tvstringR	Rttarfilet
is_tarfileR8t
getmembersR+tdirnameR9R:textractfileRR;R=R,tisdirRORJtisregtissymRtreplacetsplitR*tappendtextractRNRLtOSErrorterrnotEACCESR.tindextstrtunlinktIOError(R/ttmp_fileRZt
role_versionstatloose_versionstvtrole_versiont
role_tar_filet	meta_filetmemberstmemberR0tmeta_parent_dirtarchive_parent_dirt	installedt
n_member_nametn_archive_parent_dirtn_partst
n_final_partstn_partR_RYtcurrent((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pytinstall�s�	"		"		+
-:

!	
	
!
$ 

'*$c	C`s+td|jd|jd|jd|j�S(s�
        Returns role spec info
        {
           'scm': 'git',
           'src': 'http://git.example.com/repos/repo.git',
           'version': 'v1.0',
           'name': 'repo'
        }
        R%R$R#R"(RFR%R$R#R"(R/((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pyRnfs(RsfilesRsmetaRRsvarsRN(t__name__t
__module__tsettSUPPORTED_SCMSR'R(R)R+RBt	ROLE_DIRSRR2R3R5tpropertyRARDRNROR`R�Rn(((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pyR
-s*%	
					�("t
__future__RRRttypet
__metaclass__R�RGR'RxRUR9tdistutils.versionRtshutilRtansibleRtansible.errorsRtansible.galaxy.user_agentRtansible.module_utils._textRR	tansible.module_utils.urlsR
t!ansible.playbook.role.requirementRtansible.utils.displayRRtobjectR
(((s7/usr/lib/python2.7/site-packages/ansible/galaxy/role.pyt<module>s$	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]