Skip to content
README.rst 2.05 KiB
Newer Older
nimrod's avatar
nimrod committed
ansible-wordpress
nimrod's avatar
nimrod committed
#################
nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed
Ansible role for installing Wordpress. It installs Nginx and PHP-FPM as well.
Backups of the Wordpress installation is done daily. Theme and plugin
installation is done via filesystem, no FTP access is provisioned. A MySQL
account and database is created during the run.
nimrod's avatar
nimrod committed

Requirements
------------

nimrod's avatar
nimrod committed
Debian Jessie.
nimrod's avatar
nimrod committed

Role Variables
--------------

    wordpress_fqdn: {{ ansible_fqdn }} #Site FQDN.
    wordpress_mysql_server: #Address for the MySQL server.
nimrod's avatar
nimrod committed
    wordpress_mysql_user: #MySQL admin username.
    wordpress_mysql_password: #MySQL admin password.

nimrod's avatar
nimrod committed

Dependencies
------------

nimrod's avatar
nimrod committed
`Common role <https://git.shore.co.il/ansible/common/>`_
`Nginx role <https://git.shore.co.il/ansible/nginx/>`_
nimrod's avatar
nimrod committed

Example Playbook
----------------
nimrod's avatar
nimrod committed
::
nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed
    - hosts: wordpress01
nimrod's avatar
nimrod committed
      roles:
nimrod's avatar
nimrod committed
      - role: mysql
        mysql_admin_password: qwerty123
      - role: wordpress
        wordpress_fqdn: blog.example.com
        wordpress_password: pa55w0rd
        wordpress_mysql_server: localhost
        wordpress_mysql_admin_user: admin
        wordpress_mysql_admin_password: qwerty123

Example requirements.yml
------------------------
::

nimrod's avatar
nimrod committed
    - src: https://git.shore.co.il/ansible/common.git
nimrod's avatar
nimrod committed
      scm: git
      path: roles/
      name: common
nimrod's avatar
nimrod committed
    - src: https://git.shore.co.il/ansible/mysql.git
nimrod's avatar
nimrod committed
      scm: git
      path: roles/
      name: mysql
nimrod's avatar
nimrod committed
    - src: https://git.shore.co.il/ansible/nginx.git
nimrod's avatar
nimrod committed
      scm: git
      path: roles/
      name: nginx
nimrod's avatar
nimrod committed
    - src: https://git.shore.co.il/ansible/wordpress.git
nimrod's avatar
nimrod committed
      scm: git
      path: roles/
      name: wordpress
nimrod's avatar
nimrod committed

License
-------

nimrod's avatar
nimrod committed
This software is licnesed under the MIT licese (see the ``LICENSE.txt`` file).
nimrod's avatar
nimrod committed

Author Information
------------------

nimrod's avatar
nimrod committed
Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email
<http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
nimrod's avatar
nimrod committed
at: https://git.shore.co.il/explore.
nimrod's avatar
nimrod committed

TODO
nimrod's avatar
nimrod committed
----
nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed
- Depend on Nginx and common roles
- Use new MySQL admin account.
- Enforce TLS on MySQL connection