File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/wordpress.cpython-310.pyc
Back
o ;j� � @ sf d Z ddlZddlZe�dd�Zdd� Zdd� Zd d � Zdd� Z d d� Z dd� Zddd�Zdd� Z dS )zd This module is used to manage Wordpress installations :depends: wp binary from http://wp-cli.org/ � N�Pluginzname status update versinoc C s t jj�d�r dS dS )NZwpT)FzMissing dependency: wp)�salt�utils�path�which� r r �J/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/wordpress.py�__virtual__ s r c C s t | �S �N)r )�stuffr r r �_get_plugins s r c C sX g }t d d| � d�|d�}|�d�dd� D ] }|�|�d�� qd d � tt|�D �S )a List plugins in an installed wordpress path path path to wordpress install location user user to run the command as CLI Example: .. code-block:: bash salt '*' wordpress.list_plugins /var/www/html apache � cmd.shell� wp --path=z plugin list�Zrunas� � N� c S s g | ]}|j �qS r )�__dict__)�.0Zpluginr r r � <listcomp>/ s z list_plugins.<locals>.<listcomp>)�__salt__�split�append�mapr )r �user�ret�resp�liner r r �list_plugins s r c C sv d| i}t d d|� d| � �|d��d�}|D ]!}d|v r)|�d�d �� |d <