Skip to content

Commit

Permalink
Upgraded PHP version to 7.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenner-radham committed Jan 6, 2018
1 parent 33d9273 commit 51ce7ac
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

[Unreleased]
------------
[0.2.0] - 2018-01-06
--------------------
### Added
- Added empty `ansible.cfg` file.
- Added a `README.md` for ad-hoc Ansible provisioning.

### Changed
- Added the "virtual" directive to the Apache Fast CGI alias config.
- Upgraded the PHP version to 7.2.

0.1.0 - 2017-07-12
------------------
### Added
- Initial release.

[Unreleased]: https://github.com/jbenner-radham/wordpress-vagrant-box/compare/v0.1.0...HEAD
[0.2.0]: https://github.com/jbenner-radham/wordpress-vagrant-box/compare/v0.1.0...v0.2.0
3 changes: 2 additions & 1 deletion ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Provisioning a remote instance directly via [Ansible][ANSIBLE].
Usage
-----
From the command line run:

```sh
ansible-playbook --user=$USER --ask-pass playbook.yml
ansible-playbook --user=$USER --ask-pass playbook.yml --extra-vars='ansible_python_interpreter=/usr/bin/python3'
```

[ANSIBLE]: https://www.ansible.com/
2 changes: 2 additions & 0 deletions ansible/ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Set any ansible.cfg overrides in this file.
# See: https://docs.ansible.com/ansible/intro_configuration.html#explanation-of-values-by-section

#inventory = /etc/ansible/hosts
10 changes: 5 additions & 5 deletions ansible/roles/apache/templates/vhost.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
#Include conf-available/serve-cgi-bin.conf

<IfModule mod_fastcgi.c>
AddHandler php7.1-fcgi .php
Action php7.1-fcgi /php7.1-fcgi
Alias /php7.1-fcgi /usr/lib/cgi-bin/php7.1-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php7.1-fcgi -socket /var/run/php/php7.1-fpm.sock -pass-header Authorization
AddHandler php7.2-fcgi .php
Action php7.2-fcgi /php7.2-fcgi
Alias /php7.2-fcgi /usr/lib/cgi-bin/php7.2-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php7.2-fcgi -socket /var/run/php/php7.2-fpm.sock -pass-header Authorization
</IfModule>

# NOTE: using `/usr/lib/cgi-bin/php7.1-fcgi` here does not work, it doesn't exist in the filesystem!
# NOTE: using `/usr/lib/cgi-bin/php7.2-fcgi` here does not work, it doesn't exist in the filesystem!
<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/php/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- name: Restart PHP-FPM
service: name=php7.1-fpm
- name: Restart PHP-FPM
service: name=php7.2-fpm
state=restarted
10 changes: 5 additions & 5 deletions ansible/roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@

- name: Install PHP
apt:
name: php7.1-fpm
name: php7.2-fpm
update_cache: yes
cache_valid_time: 3600

- name: Install PHP Modules
apt:
name: '{{ item }}'
with_items:
- php7.1-curl
- php7.1-mysql
- php7.1-xml # RSS feed on the front page requires this for operation.
- php7.1-xmlrpc # Required for WP JetPack.
- php7.2-curl
- php7.2-mysql
- php7.2-xml # RSS feed on the front page requires this for operation.
- php7.2-xmlrpc # Required for WP JetPack.

- name: Enable PHP Modules
command: phpenmod {{ item }}
Expand Down

0 comments on commit 51ce7ac

Please sign in to comment.