| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/ |
Upload File : |
o
;j
� @ s| d Z ddlZddlZddlZddlZddlZddiZe�e �Z
dZdd� Zdd d
�Z
ddd
�Zdd� Zdd� Zddd�ZdS )z
Manage PHP pecl extensions.
� N�list_�list�peclc C s t jj�d�r tS dS )Nr )FzEThe pecl execution module not loaded: pecl binary is not in the path.)�salt�utils�path�which�__virtualname__� r
r
�E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/pecl.py�__virtual__ s r Fc C sR d| � �}t jj�|�rd| }td |dd�}|d dkr"|d S t�d � d
S )z.
Execute the command passed with pecl
zpecl z yes '' | zcmd.run_allT)Zpython_shell�retcoder �stdoutz,Problem running pecl. Is php-pear installed?� )r r �dataZis_trueZ__salt__�log�error)�command�defaultsZcmdline�retr
r
r �_pecl s
r �stablec C s� t | t�r| g} dt�|�� �}|r"td�|t�d�| ���|d�S td�|t�d�| ���|d� t | t�s:| g} | D ]1}d}d|v rL|�d�\}}nd}t |�}|D ]}d �||�
|�d
�}||v rgd}qT|sm dS q<dS )a
.. versionadded:: 0.17.0
Installs one or several pecl extensions.
pecls
The pecl extensions to install.
defaults
Use default answers for extensions such as pecl_http which ask
questions before installation. Without this option, the pecl.installed
state will hang indefinitely when trying to install these extensions.
force
Whether to force the installed version or not
CLI Example:
.. code-block:: bash
salt '*' pecl.install fuse
z-d preferred_state=z{} install -f {}� )r z
{} install {}F�/Nz{}-{}r T)�
isinstance�str�shlex�quoter �format�joinr �splitr �get) �peclsr �forceZpreferred_stater �found�channelZinstalled_peclsZinstalled_pecl_with_versionr
r
r �install. s>