
[

Ansible role that installs and configures WordPress on Apache.
Features include:
- Installation of any WordPress version to specified directory
- Configuration of wp-config.php
- Fetch random salts for wp-config.php (https://api.wordpress-apache.org/secret-key/1.1/salt/)
- Configuration of Apache virtual host
Using ansible-galaxy:
$ ansible-galaxy install darthwade.wordpress-apacheUsing arm (Ansible Role Manager):
$ arm install darthwade.wordpress-apacheUsing git:
$ git clone https://github.com/darthwade/ansible-role-wordpress-apache.git- Ansible 1.4 or higher
- PHP (I recommend
geerlingguy.phprole) - Apache 2.4 or higher (I recommend
geerlingguy.apacherole) - darthwade.wordpress
Here is a list of all the default variables for this role, which are also available in defaults/main.yml.
wp_version: 4.0
wp_install_dir: '/var/sites/awesome_wordpress_site'
wp_db_name: 'database_name_here'
wp_db_user: 'username_here'
wp_db_password: 'password_here'
wp_db_host: 'localhost'
wp_apache_hostname: 'example.com'
wp_apache_alias: 'www.example.com cdn.example.com'
wp_apache_admin_email: 'admin@example.com'
wp_db_charset: 'utf8'
wp_db_collate: ''
wp_table_prefix: 'wp_'
wp_debug: false- hosts: all
vars:
wp_version: 4.0
wp_install_dir: '/var/sites/awesome_wordpress_site'
wp_db_name: 'database_name_here'
wp_db_user: 'username_here'
wp_db_password: 'password_here'
wp_db_host: 'localhost'
wp_apache_hostname: 'localhost'
wp_apache_alias: 'localhost'
wp_apache_admin_email: 'admin@example.com'
roles:
- darthwade.wordpress-apache$ git clone https://github.com/darthwade/ansible-role-wordpress-apache.git
$ cd ansible-role-wordpress-apache
$ vagrant upIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests and examples for any new or changed functionality.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Licensed under the MIT License. See the LICENSE file for details.
Copyright (c) 2014 Vadym Petrychenko