%PDF- %PDF-
| Direktori : /proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/states/wordpress.pyc |
�
���^c @@ sJ d Z d d l m Z m Z m Z d � Z d � Z d � Z d � Z d S( uj
This state module is used to manage Wordpress installations
:depends: wp binary from http://wp-cli.org/
i ( t absolute_importt print_functiont unicode_literalsc C@ s
d t k S( Nu wordpress.show_plugin( t __salt__( ( ( s9 /usr/lib/python2.7/site-packages/salt/states/wordpress.pyt __virtual__ s c
C@ s� i | d 6i d 6d d 6t d 6} t d | | � } | r\ t | d <d j | � | d <| St d r� d | d <d j | � | d <| St d
| | | | | | | � } | r� t | d <d j | � | d <i | d 6| d <n d
j | � | d <| S( u.
Run the initial setup of wordpress
name
path to the wordpress installation
user
user that owns the files for the wordpress installation
admin_user
username for wordpress website administrator user
admin_password
password for wordpress website administrator user
admin_email
email for wordpress website administrator user
title
title for the wordpress website
url
url for the wordpress website
.. code-block:: yaml
/var/www/html:
wordpress.installed:
- title: Daniel's Awesome Blog
- user: apache
- admin_user: dwallace
- admin_email: dwallace@example.com
- admin_password: password123
- url: https://blog.dwallace.com
u nameu changesu u commentu resultu wordpress.is_installedu# Wordpress is already installed: {0}u testu Wordpress will be installed: {0}u wordpress.installu Wordpress Installed: {0}u newu Failed to install wordpress: {0}N( t FalseR t Truet formatt __opts__t None(
t namet usert
admin_usert admin_passwordt admin_emailt titlet urlt rett checkt resp( ( s9 /usr/lib/python2.7/site-packages/salt/states/wordpress.pyt installed s* $
"
c C@ si i | d 6i d 6d d 6t d 6} t d | | | � } | d d k ri t | d <d j | � | d <| St d
r� d | d <d j | � | d <| St d | | | � } | t k r� t | d <d
j | � | d <i | d 6t d | | | � d 6| d <ng | d k rRt | d <d j | � | d <i | d 6t d | | | � d 6| d <n d j | � | d <| S( uX
Activate wordpress plugins
name
name of plugin to activate
path
path to wordpress installation
user
user who should own the files in the wordpress installation
.. code-block:: yaml
HyperDB:
wordpress.activated:
- path: /var/www/html
- user: apache
u nameu changesu u commentu resultu wordpress.show_pluginu statusu activeu Plugin already activated: {0}u testu Plugin will be activated: {0}u wordpress.activateu Plugin activated: {0}u oldu newu Plugin failed to activate: {0}N( R R R R R R ( R
t pathR R R R ( ( s9 /usr/lib/python2.7/site-packages/salt/states/wordpress.pyt activatedQ s8
!
!c C@ si i | d 6i d 6d d 6t d 6} t d | | | � } | d d k ri t | d <d j | � | d <| St d
r� d | d <d j | � | d <| St d | | | � } | t k r� t | d <d
j | � | d <i | d 6t d | | | � d 6| d <ng | d k rRt | d <d j | � | d <i | d 6t d | | | � d 6| d <n d j | � | d <| S( u^
Deactivate wordpress plugins
name
name of plugin to deactivate
path
path to wordpress installation
user
user who should own the files in the wordpress installation
.. code-block:: yaml
HyperDB:
wordpress.deactivated:
- path: /var/www/html
- user: apache
u nameu changesu u commentu resultu wordpress.show_pluginu statusu inactiveu Plugin already deactivated: {0}u testu Plugin will be deactivated: {0}u wordpress.deactivateu Plugin deactivated: {0}u oldu newu Plugin failed to deactivate: {0}N( R R R R R R ( R
R R R R R ( ( s9 /usr/lib/python2.7/site-packages/salt/states/wordpress.pyt deactivated� s8
!
!N( t __doc__t
__future__R R R R R R R ( ( ( s9 /usr/lib/python2.7/site-packages/salt/states/wordpress.pyt <module> s
A 9