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/playbook/role/__pycache__/metadata.cpython-39.pyc
a

�)g�@s�ddlmZmZmZeZddlZddlmZm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZdgZGdd�dee�ZdS)
�)�absolute_import�division�print_functionN)�AnsibleParserError�AnsibleError)�	to_native)�string_types)�NonInheritableFieldAttribute)�Base)�CollectionSearch)�load_list_of_roles)�RoleRequirement�RoleMetadatacs~eZdZdZeddd�Zeded�Zedd�Zede	d�Z
d�fd
d�	Zeddd
��Z
dd�Zdd�Zdd�Zdd�Z�ZS)rzt
    This class wraps the parsing and validation of the optional metadata
    within each Role (meta/main.yml).
    �boolF)�isa�default�listZ
GalaxyInfo)r�dictNcs||_tt|���dS)N)�_owner�superr�__init__)�self�owner��	__class__��B/usr/lib/python3.9/site-packages/ansible/playbook/role/metadata.pyr/szRoleMetadata.__init__cCs4t|t�std|����t|d�j|||d�}|S)zY
        Returns a new RoleMetadata object based on the datastructure passed in.
        z3the 'meta/main.yml' for role %s is not a dictionary)r)�variable_manager�loader)�
isinstancerrZget_namerZ	load_data)�datarrr�mrrr�load3s
zRoleMetadata.loadc
s�g}|r�t|t�s td|jd��|D]�}t|t�sBd|vsBd|vrN|�|�q$z.t�|�}|�d�rp|d|d<|�|�Wq$t	y�}ztt
|�||d��WYd}~q$d}~00q$d}d}|j�r*tj
�|jj�}|jjdd�p�g}|jj���r�fdd�|D�}|�d	��d
|v�r*|�d
�zt||jj||j|j|d�WSt�y~}	ztd|j|	d��WYd}	~	n
d}	~	00dS)
z�
        This is a helper loading function for the dependencies list,
        which returns a list of RoleInclude objects
        z(Expected role dependencies to be a list.)�objZrole�name)r#Zorig_excNcsg|]}|�kr|�qSrr)�.0�c�Zowner_collectionrr�
<listcomp>d�z3RoleMetadata._load_dependencies.<locals>.<listcomp>rzansible.legacy)Zplay�current_role_pathrr�collection_search_listz6A malformed list of role dependencies was encountered.)rrrZ_dsr�appendr
Zrole_yaml_parse�getrrr�os�path�dirnameZ
_role_path�collectionsZ_role_collection�insertrZ_playZ_variable_managerZ_loader�AssertionError)
r�attr�dsZrolesZrole_defZ
def_parsed�excr*r+�err'r�_load_dependencies?sB



*

�zRoleMetadata._load_dependenciescCs|S)z�
        This is a helper loading function for the galaxy info entry
        in the metadata, which returns a GalaxyInfo object rather than
        a simple dictionary.
        r)rr4r5rrr�_load_galaxy_infoqszRoleMetadata._load_galaxy_infocCst|j|jd�S)N)�allow_duplicates�dependencies)rZ_allow_duplicatesZ
_dependencies)rrrr�	serializezs�zRoleMetadata.serializecCs,t|d|�dd��t|d|�dg��dS)Nr:Fr;)�setattrr-)rr rrr�deserialize�szRoleMetadata.deserialize)N)NN)�__name__�
__module__�__qualname__�__doc__r	r:rr;Zgalaxy_inforZargument_specsr�staticmethodr"r8r9r<r>�
__classcell__rrrrr$s
2	)Z
__future__rrr�typeZ
__metaclass__r.Zansible.errorsrrZansible.module_utils._textrZansible.module_utils.sixrZansible.playbook.attributer	Zansible.playbook.baser
Z!ansible.playbook.collectionsearchrZansible.playbook.helpersrZ!ansible.playbook.role.requirementr
�__all__rrrrr�<module>s