HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/wordpress.cpython-310.pyc
o

�N�g��@s(dZdd�Zdd�Zdd�Zdd�Zd	S)
zj
This state module is used to manage Wordpress installations

:depends: wp binary from http://wp-cli.org/
cCsdtvrdSdS)N�wordpress.show_pluginT)Fz$wordpress module could not be loaded)�__salt__�rr�I/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/wordpress.py�__virtual__src
Cs�|iddd�}td||�}|rd|d<d|��|d<|Std	r.d
|d<d|��|d<|Std|||||||�}	|	rOd|d<d
|��|d<d|	i|d<|Sd|��|d<|S)a.
    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
    �F��name�changes�comment�resultzwordpress.is_installedTrz Wordpress is already installed: r
�testNzWordpress will be installed: zwordpress.installzWordpress Installed: �newr	zFailed to install wordpress: �rZ__opts__)
r�userZ
admin_userZadmin_passwordZadmin_email�title�url�ret�check�resprrr�	installeds($��rcC�|iddd�}td|||�}|ddkr"d|d<d	|��|d
<|Stdr3d|d<d
|��|d
<|Std|||�}|durYd|d<d|��|d
<|td|||�d�|d<|S|durwd|d<d	|��|d
<|td|||�d�|d<|Sd|��|d
<|S)aX
    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
    rFrr�statusZactiveTrzPlugin already activated: r
rNzPlugin will be activated: zwordpress.activatezPlugin activated: ��oldr
r	zPlugin failed to activate: r�r�pathrrrrrrr�	activatedL�6
��
��rcCr)a^
    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
    rFrrrZinactiveTrzPlugin already deactivated: r
rNzPlugin will be deactivated: zwordpress.deactivatezPlugin deactivated: rr	zPlugin failed to deactivate: rrrrr�deactivated�rrN)�__doc__rrrrrrrr�<module>s
>6