Skip to content

Commit

Permalink
Introduce php version variable, set php default version to 7.0, upgra…
Browse files Browse the repository at this point in the history
…de Ubuntu to 16.04
  • Loading branch information
dirkaholic committed Feb 24, 2017
1 parent a5e7190 commit 341d7dd
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 15 deletions.
8 changes: 7 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,24 @@ Installed components

* [Nginx](http://nginx.org)
* [MySQL](http://dev.mysql.com/downloads/mysql/)
* [PHP 5.6](http://www.php.net/)
* [PHP 7.0](http://www.php.net/)
* [php-fpm](http://php-fpm.org)
* [git](http://git-scm.com/)
* [Composer](https://getcomposer.org/)
* [Symfony2 Standard Edition](https://github.com/symfony/symfony-standard)
* [Laravel](https://laravel.com/)
* [PHPUnit](https://phpunit.de/)

If you don't like/need some of the components just remove them from the roles section in playbook/vagrant.yml.

Changes
-------

### unreleased

* Introduce php_version variable, set PHP default version to 7.0 [#33](https://github.com/dirkaholic/vagrant-php-dev-box/pull/33)
* Upgrade Ubuntu box to 16.04 (latest LTS version) [#33](https://github.com/dirkaholic/vagrant-php-dev-box/pull/33)

### v1.4.0

* Transfer ansible playbooks to roles [#31](https://github.com/dirkaholic/vagrant-php-dev-box/pull/31)
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Vagrant.require_version ">= 1.7.0"

Vagrant.configure(2) do |config|

config.vm.box = "ubuntu/trusty64"
config.vm.box = "bento/ubuntu-16.04"

# Disable the new default behavior introduced in Vagrant 1.7, to
# ensure that all Vagrant machines will use the same SSH key pair.
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/laravel-quickstart/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- name: Copy across new php-fpm pool config for laravel
template:
src=php-fpm.conf.j2
dest=/etc/php/5.6/fpm/pool.d/laravel.conf
dest=/etc/php/{{ php_version }}/fpm/pool.d/laravel.conf
notify:
- restart php-fpm

Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/php-fpm/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- name: restart php-fpm
service: name=php5.6-fpm state=restarted
service: name=php{{ php_version }}-fpm state=restarted
2 changes: 1 addition & 1 deletion playbooks/roles/php-fpm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
- name: Install php-fpm
apt: name=php5.6-fpm state=present
apt: name=php{{ php_version }}-fpm state=present
1 change: 1 addition & 0 deletions playbooks/roles/php/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
php_version: 7.0
composer_process_timeout: 900
24 changes: 15 additions & 9 deletions playbooks/roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
---
- name: Add apt repository for PHP 5.6
- name: Add apt key for PHP ppa
apt_key:
keyserver: keyserver.ubuntu.com
id: 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
state: present

- name: Add apt repository for PHP
apt_repository: repo='ppa:ondrej/php/ubuntu'

- name: Install python-software-properties
apt: name=python-software-properties state=present

- name: Install php 5.6
apt: name=php5.6 state=present
- name: Install PHP
apt: name=php{{ php_version }} state=present

- name: Install required php packages
apt: name={{ item }} state=present
with_items:
- php5.6-mysql
- php5.6-intl
- php5.6-cli
- php5.6-mcrypt
- php5.6-mbstring
- php5.6-dom
- php{{ php_version }}-mysql
- php{{ php_version }}-intl
- php{{ php_version }}-cli
- php{{ php_version }}-mcrypt
- php{{ php_version }}-mbstring
- php{{ php_version }}-dom

- name: Enable the MCrypt extension
shell: phpenmod mcrypt
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/symfony-standard/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- name: Copy across new php-fpm pool config for symfony
template:
src=php-fpm.conf.j2
dest=/etc/php/5.6/fpm/pool.d/symfony.conf
dest=/etc/php/{{ php_version }}/fpm/pool.d/symfony.conf
notify:
- restart php-fpm

Expand Down

0 comments on commit 341d7dd

Please sign in to comment.