Ansible Role wordpress
This role installs and configures the WordPress CMS.
Attention: It is intended that when you call http://{wordpress__url}}
you will get a white page because no theme is installed. http://{wordpress__url}}/wp-admin
works as expected.
Mandatory Requirements
Install a web server (for example Apache httpd), and configure a virtual host for Nextcloud. This can be done using the linuxfabrik.lfops.apache_httpd role.
Install MariaDB 10+. This can be done using the linuxfabrik.lfops.mariadb_server role.
Install PHP 7+. This can be done using the linuxfabrik.lfops.php role.
If you use the WordPress Playbook, this is automatically done for you.
Mandatory Role Variables
Variable |
Description |
---|---|
|
The Email of the WordPress admin user. |
|
The WordPress admin user account. Subkeys: |
|
The database user account with permissions on the |
|
The WordPress site title. |
|
The WordPress URL, without |
Example:
# mandatory
wordpress__admin_email: 'webmaster@example.com'
wordpress__admin_user:
username: 'wordpress-admin'
password: 'linuxfabrik'
wordpress__database_user:
username: 'wordpress'
password: 'linuxfabrik'
wordpress__site_title: 'WordPress Test Site'
wordpress__url: 'wordpress.example.com'
Optional Role Variables
Variable |
Description |
Default Value |
---|---|---|
|
The host on which the database is accessible. |
|
|
The name of the database. |
|
|
Prevent editing of plugin / theme files from the admin WebGUI. Strongly recommended to set this to |
|
|
The installation directory for WordPress. |
|
|
List of WordPress plugin slugs. To get a list of already installed plugins, use the WordPress CLI |
|
|
The WordPress theme to install. Accepts a theme slug, the path to a local zip file, or a URL to a remote zip file. |
unset |
|
The WordPress version to install. Possible options: |
|
|
Path to a WXR export file which will be imported after installing WordPress. The file includes posts, pages, comments, custom fields, categories and tags, and can be created using the wp-cli export function or the |
unset |
Example:
# optional
wordpress__database_host: 'localhost'
wordpress__database_name: 'wordpress'
wordpress__disallow_file_edit: true
wordpress__install_dir: '/var/www/html/{{ wordpress__url }}'
wordpress__plugins:
- name: 'bbPress'
state: 'present'
- name: 'Akismet'
state: 'absent'
wordpress__theme: 'twentysixteen'
wordpress__version: 'latest'
wordpress__wxr_export: '/tmp/wordpress.xml'