https://github.com/petermosmans/ansible-role-wordpress
Install, configure and update WordPress and its plugins
https://github.com/petermosmans/ansible-role-wordpress
Last synced: 5 months ago
JSON representation
Install, configure and update WordPress and its plugins
- Host: GitHub
- URL: https://github.com/petermosmans/ansible-role-wordpress
- Owner: PeterMosmans
- License: gpl-3.0
- Created: 2016-12-15T04:45:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-15T05:14:10.000Z (over 9 years ago)
- Last Synced: 2025-01-23T06:29:12.573Z (over 1 year ago)
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ansible Role: wordpress
=========
Build status for this role: [](https://travis-ci.org/PeterMosmans/ansible-role-wordpress)
This role installs, configures and/or updates WordPress.
Requirements
------------
MySQL, and Apache2.
Role Variables
--------------
Available variables are listed below, along with their default values. The defaults can be found in ```defaults/main.yml```.
**wordpress_sites**: A list with WordPress sites, their database (db_name), database username (db_user) and password (db_password), source directory (src) and installed plugins. Example:
```
wordpress_sites:
- name: mywebsite
src: /var/www/mywebsite
db_name: mydatabase
db_user: mydatabaseuser
db_password: mydatabasepassword
plugins:
- akismet
- google-captcha
```
Note that you'll need to have the websites configured for the PeterMosmans.apache2 role. Example:
```
apache2_websites:
- src: ../../myrole/files
name: www.mysite.com.conf
```
**wordpress_remove**: A list of files which will be forcibly removed after installing WordPress. Default:
```
wordpress_remove:
- readme.html
- license.txt
- wp-config-sample.php
- wp-content/plugins/hello.php
- wp-content/themes/twentyeleven
- wp-content/themes/twentyfifteen
- wp-content/themes/twentyfourteen
- wp-content/themes/twentythirteen
- wp-content/themes/twentytwelve
```
**www_group**: The group under which the webserver runs (reads content). Default:
```
www_group: www-data
```
Dependencies
------------
PeterMosmans.apache2
Example Playbook
----------------
```
- hosts: all
become: yes
become_method: sudo
roles:
- role: PeterMosmans.apache2
- role: PeterMosmans.wordpress
vars:
- wordpress_sites:
- name: mywebsite
src: /var/www/mywebsite
db_name: mydatabase
db_user: mydatabaseuser
db_password: mydatabasepassword
plugins:
- akismet
- google-captcha
```
Use the `--tags update` to perform an update of the WordPress installation, as well as all plugins.
License
-------
GPLv3
Author Information
------------------
Created by Peter Mosmans. Feedback always welcome.