a ì)gå ã@spdZddlmZmZmZeZddlZddlm Z ddl m Z ddl mZddlmZdd„ZGd d „d eƒZdS) z9 This manages remote shared Ansible objects, mainly rolesé)Úabsolute_importÚdivisionÚprint_functionN)Úcontext)Úto_bytes)Ú yaml_loadcCsVtj tj t¡dd¡}tt|dd�dƒ�}t|ƒWdƒS1sH0YdS)NÚdatazcollections_galaxy_meta.ymlZsurrogate_or_strict)ÚerrorsÚrb)ÚosÚpathÚjoinÚdirnameÚ__file__Úopenrr)Ú meta_pathZ galaxy_obj©rú;/usr/lib/python3.9/site-packages/ansible/galaxy/__init__.pyÚ get_collections_galaxy_meta_info%src@s4eZdZdZdd„Zedd„ƒZdd„Zdd „Zd S) ÚGalaxyz Keeps global galaxy info cCsntj dtj¡}||_i|_tj  t ¡\}}tj dd¡}|dkrXtj  |tj d¡¡}tj  |d|¡|_ dS)NÚ roles_pathZ role_typeÚdefaultÚtyper) rZCLIARGSÚgetÚCZDEFAULT_ROLES_PATHZ roles_pathsÚrolesr r Úsplitrr Ú DATA_PATH)ÚselfrZthis_dirZ this_filenameZ type_pathrrrÚ__init__.szGalaxy.__init__cCs|jS©N)r)rrrrÚdefault_role_skeleton_path@sz!Galaxy.default_role_skeleton_pathcCs||j|j<dSr )rÚname)rZrolerrrÚadd_roleDszGalaxy.add_rolecCs |j|=dSr )r)rZ role_namerrrÚ remove_roleGszGalaxy.remove_roleN) Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚpropertyr!r#r$rrrrr+s  r)r(Z __future__rrrrZ __metaclass__r Zansible.constantsZ constantsrZansiblerZansible.module_utils._textrZ ansible.module_utils.common.yamlrrÚobjectrrrrrÚs