a ì)gã@spddlmZmZmZeZddlZddlmZm Z m Z m Z ddl m Z ddlmZddlmZGdd„deƒZdS) é)Úabsolute_importÚdivisionÚprint_functionN)Ú AnsibleErrorÚ AnsibleActionÚAnsibleActionFailÚAnsibleActionSkip)Úto_text)Úboolean)Ú ActionBasecs"eZdZdZd‡fdd„ Z‡ZS)Ú ActionModuleTNc sÂ|durtƒ}tt|ƒ ||¡}~|jj dd¡}|jj dd¡}t|jj dd¡dd}|jj dd¡}|jj dd ¡}z.zäd |jjvrÆd|jjvr¢td ƒ‚t|jj  d ¡dd |jjd<}|dusÖ|durÞtd ƒ‚|r|  |¡}|  |¡rt d |ƒ‚|  |¡}t j |¡}|srz|jj| d|¡|d}Wn2typ} ztt| ƒƒ‚WYd} ~ n d} ~ 00z|j||d d} Wn2ty¸} ztt| ƒƒ‚WYd} ~ n d} ~ 00| drÎ| dsÚtd|ƒ‚|s|jj |jjjd¡} | || ¡|jj ¡} dD]} | | vr| | =q|sL| |jjj| f¡| | d<| |jd| |d¡Wn2ty–} z| | j ¡WYd} ~ n d} ~ 00W| !|jjj¡n| !|jjj¡0|S)z" handler for unarchive operations NÚsrcÚdestÚ remote_srcF)ÚstrictÚcreatesÚdecryptTÚcopyz9parameters are mutually exclusive: ('copy', 'remote_src')z&src (or content) and dest are requiredzskipped, since %s existsÚfiles)r)Zall_varsÚfollowÚexistsÚisdirz!dest '%s' must be an existing dirÚsourcezansible.legacy.unarchive)Z module_nameZ module_argsÚ task_vars)"ÚdictÚsuperr ÚrunZ_taskÚargsÚgetr rÚpopZ_remote_expand_userZ_remote_file_existsrÚosÚpathÚ expanduserZ_loaderZ get_real_fileZ _find_needlerr Z_execute_remote_statZ _connectionZ_shellZ join_pathZtmpdirZ_transfer_filerZ _fixup_perms2ÚupdateZ_execute_modulerÚresultZ_remove_tmp_path)ÚselfÚtmprr$rrrrrÚeZ remote_statZtmp_srcZnew_module_argsÚkey©Ú __class__©úD/usr/lib/python3.9/site-packages/ansible/plugins/action/unarchive.pyr!s`  $     ""     $$zActionModule.run)NN)Ú__name__Ú __module__Ú __qualname__ZTRANSFERS_FILESrÚ __classcell__r+r+r)r,r sr )Z __future__rrrÚtypeZ __metaclass__r Zansible.errorsrrrrZansible.module_utils._textr Z)ansible.module_utils.parsing.convert_boolr Zansible.plugins.actionr r r+r+r+r,Ús