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/plugins/action/__pycache__/yum.cpython-39.pyc
a

�)gi�@s^ddlmZmZmZeZddlmZddlm	Z	ddl
mZe�Ze
d�ZGdd�de	�ZdS)	�)�absolute_import�division�print_function)�AnsibleActionFail)�
ActionBase)�Display)Zyum�yum4�dnfcs"eZdZdZd�fdd�	Z�ZS)�ActionModuleFNcs�d|_d|_tt|��||�}~d|jjvr@d|jjvr@td��|jj�d|jj�dd��}|dkr�z.|jj	r�|j
�d|jj	�}n|j
�d�}Wnty�Yn0|t
v�r|jdtd	d
d�|d�}t�d
|�|�di��d	d�}|jj	r�|jj�r|dk�rd|i|d<|t
v�r.|�ddd��n�|dk�r<d}d|}|jj�|��sj|�dd|d��nV|jj��}d|v�r�|d=d|v�r�|d=t�d|�|�|j||||jjd��|jj�s�|�|jjj�|S)a�
        Action plugin handler for yum3 vs yum4(dnf) operations.

        Enables the yum module to use yum3 and/or yum4. Yum4 is a yum
        command-line compatibility layer on top of dnf. Since the Ansible
        modules for yum(aka yum3) and dnf(aka yum4) call each of yum3 and yum4's
        python APIs natively on the backend, we need to handle this here and
        pass off to the correct Ansible module to execute on the remote system.
        TZuseZuse_backendz9parameters are mutually exclusive: ('use', 'use_backend')�autoz.{{hostvars['%s']['ansible_facts']['pkg_mgr']}}z{{ansible_facts.pkg_mgr}}zansible.legacy.setupZansible_pkg_mgrz!all)�filterZ
gather_subset)�module_name�module_args�	task_varszFacts %sZ
ansible_factsZpkg_mgr)zfCould not detect which major revision of yum is in use, which is required to determine module backend.zpYou should manually specify use_backend to tell the module whether to use the yum (yum3) or dnf (yum4) backend}))Zfailed�msgrr	zansible.legacy.z+Could not find a yum module backend for %s.z3Running %s as the backend for the yum action plugin)r
rrZ
wrap_async)Z_supports_check_modeZ_supports_async�superr
�runZ_task�argsr�getZdelegate_toZ_templar�template�	Exception�VALID_BACKENDSZ_execute_module�dict�display�debugZdelegate_facts�updateZ_shared_loader_objZ
module_loaderZ
has_plugin�copyZvvvvZ	async_valZ_remove_tmp_pathZ_connectionZ_shellZtmpdir)�self�tmpr�result�moduleZfactsZnew_module_args��	__class__��>/usr/lib/python3.9/site-packages/ansible/plugins/action/yum.pyr!s\
�
��	


�
zActionModule.run)NN)�__name__�
__module__�__qualname__ZTRANSFERS_FILESr�
__classcell__r#r#r!r$r
sr
N)Z
__future__rrr�typeZ
__metaclass__Zansible.errorsrZansible.plugins.actionrZansible.utils.displayrr�	frozensetrr
r#r#r#r$�<module>s