%PDF- %PDF-
| Direktori : /proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/ |
| Current File : //proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/wordpress.pyc |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l m Z e j
d d � Z d � Z d � Z
d � Z d
� Z d � Z d � Z d d
� Z d � Z d S( ud
This module is used to manage Wordpress installations
:depends: wp binary from http://wp-cli.org/
i ( t absolute_importt print_functiont unicode_literalsN( t mapu Pluginu name status update versinoc C@ s t j j j d � r t St S( Nu wp( t saltt utilst patht whicht Truet False( ( ( s: /usr/lib/python2.7/site-packages/salt/modules/wordpress.pyt __virtual__ s c C@ s
t | � S( N( t Plugin( t stuff( ( s: /usr/lib/python2.7/site-packages/salt/modules/wordpress.pyt _get_plugins s c C@ s| g } t d d j | � d | �} x1 | j d � d D] } | j | j d � � q9 Wg t t | � D] } | j ^ qi S( u
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
u cmd.shellu wp --path={0} plugin listt runasu
i u ( t __salt__t formatt splitt appendR R
t __dict__( R t usert rett respt linet plugin( ( s: /usr/lib/python2.7/site-packages/salt/modules/wordpress.pyt list_plugins s c C@ s� i | d 6} t d d j | | � d | �j d � } xf | D]^ } d | k rq | j d � d j � | d <q? d
| k r? | j d � d j � | d <q? q? W| S( uF
Show a plugin in a wordpress install and check if it is installed
name
Wordpress plugin name
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.show_plugin HyperDB /var/www/html apache
u nameu cmd.shellu wp --path={0} plugin status {1}R u
u Statusu i����u statusu Versionu version( R R R t lower( t nameR R R R R ( ( s: /usr/lib/python2.7/site-packages/salt/modules/wordpress.pyt show_plugin6 s
$c C@ s| t | | | � } | d d k r&