Merge pull request #101 from lamosty/capitalize_WordPress_P

Capitalize P in WordPress
pull/63/head
Tim Gerla 9 years ago
commit 31f0c7c8fe
  1. 12
      wordpress-nginx/README.md
  2. 6
      wordpress-nginx/group_vars/all
  3. 12
      wordpress-nginx/roles/wordpress/tasks/main.yml
  4. 2
      wordpress-nginx/site.yml

@ -1,10 +1,10 @@
## Wordpress+Nginx+PHP-FPM Deployment
## WordPress+Nginx+PHP-FPM Deployment
- Requires Ansible 1.2 or newer
- Expects CentOS/RHEL 6.x hosts
These playbooks deploy a simple all-in-one configuration of the popular
Wordpress blogging platform and CMS, frontend by the Nginx web server and the
WordPress blogging platform and CMS, frontend by the Nginx web server and the
PHP-FPM process manager. To use, copy the `hosts.example` file to `hosts` and
edit the `hosts` inventory file to include the names or URLs of the servers
you want to deploy.
@ -13,17 +13,17 @@ Then run the playbook, like this:
ansible-playbook -i hosts site.yml
The playbooks will configure MySQL, Wordpress, Nginx, and PHP-FPM. When the run
is complete, you can hit access server to begin the Wordpress configuration.
The playbooks will configure MySQL, WordPress, Nginx, and PHP-FPM. When the run
is complete, you can hit access server to begin the WordPress configuration.
### Ideas for Improvement
Here are some ideas for ways that these playbooks could be extended:
- Parameterize the Wordpress deployment to handle multi-site configurations.
- Parameterize the WordPress deployment to handle multi-site configurations.
- Separate the components (PHP-FPM, MySQL, Nginx) onto separate hosts and
handle the configuration appropriately.
- Handle Wordpress upgrades automatically.
- Handle WordPress upgrades automatically.
We would love to see contributions and improvements, so please fork this
repository on GitHub and send us your changes via pull requests.

@ -1,9 +1,9 @@
---
# Which version of Wordpress to deploy
# Which version of WordPress to deploy
wp_version: 3.7
wp_sha256sum: 94b8b7a7241ec0817defa1c35f738d777f01ac17a4e45ee325c0f1778504fd94
# These are the Wordpress database settings
# These are the WordPress database settings
wp_db_name: wordpress
wp_db_user: wordpress
wp_db_password: secret
@ -12,7 +12,7 @@ wp_db_password: secret
mysql_port: 3306
# This is used for the nginx server configuration, but access to the
# Wordpress site is not restricted by a named host.
# WordPress site is not restricted by a named host.
server_hostname: www.example.com
# Disable All Updates

@ -1,5 +1,5 @@
---
- name: Download Wordpress
- name: Download WordPress
get_url: url=http://wordpress.org/wordpress-{{ wp_version }}.tar.gz dest=/srv/wordpress-{{ wp_version }}.tar.gz
sha256sum="{{ wp_sha256sum }}"
@ -12,19 +12,19 @@
- name: Add user "wordpress"
user: name=wordpress group=wordpress home=/srv/wordpress/
- name: Fetch random salts for Wordpress config
- name: Fetch random salts for WordPress config
local_action: command curl https://api.wordpress.org/secret-key/1.1/salt/
register: "wp_salt"
sudo: no
- name: Create Wordpress database
- name: Create WordPress database
mysql_db: name={{ wp_db_name }} state=present
- name: Create Wordpress database user
- name: Create WordPress database user
mysql_user: name={{ wp_db_user }} password={{ wp_db_password }} priv={{ wp_db_name }}.*:ALL host='localhost' state=present
- name: Copy Wordpress config file
- name: Copy WordPress config file
template: src=wp-config.php dest=/srv/wordpress/
- name: Change ownership of Wordpress installation
- name: Change ownership of WordPress installation
file: path=/srv/wordpress/ owner=wordpress group=wordpress state=directory recurse=yes

@ -1,5 +1,5 @@
---
- name: Install Wordpress, MySQL, Nginx, and PHP-FPM
- name: Install WordPress, MySQL, Nginx, and PHP-FPM
hosts: wordpress-server
user: root
# remote_user: user