Fix php 7.0 installation

This commit is contained in:
Nikita Strelkov 2016-10-03 11:42:26 +05:00
parent 2da074e4a0
commit e5e734cd26
3 changed files with 22 additions and 10 deletions

View File

@ -1,4 +1,8 @@
---
- name: Update apt
become: yes
apt: update_cache=yes autoremove=yes
- name: Add ppa Repository
sudo: yes
apt_repository: repo=ppa:ondrej/{{ php.ppa }}
@ -14,7 +18,13 @@
- name: Install PHP Packages
sudo: yes
apt: pkg={{ item }} state=latest
with_items: php.packages
with_items: '{{ php.packages }}'
when: php.packages is defined
- name: Install PHP PECL Packages
become: yes
apt: pkg={{ item }} state=latest force=yes
with_items: '{{ php.pecl_packages }}'
when: php.packages is defined
- include: configure.yml

View File

@ -1,10 +1,10 @@
---
- name: ensure timezone is set in cli php.ini
lineinfile: dest=/etc/php5/cli/php.ini
regexp='date.timezone ='
line='date.timezone = {{ server.timezone }}'
- name: enabling opcache cli
lineinfile: dest=/etc/php5/cli/php.ini
regexp=';opcache.enable_cli=0'
line='opcache.enable_cli=1'
lineinfile: dest=/etc/php/7.0/cli/php.ini
regexp=';?opcache.enable=\d'
line='opcache.enable=1'
- name: ensure timezone is set in cli php.ini
lineinfile: dest=/etc/php/7.0/cli/php.ini
regexp='date.timezone ='
line='date.timezone = {{ server.timezone }}'

View File

@ -10,6 +10,8 @@ vagrant_local:
php:
install: '1'
ppa: php
packages: [php7.0-cli, php7.0-intl, php7.0-mcrypt, php7.0-mysql, php7.0-curl, php7.0-json, php7.0-xml]
packages: [php7.0-cli, php7.0-intl, php7.0-mcrypt, php7.0-mysql, php7.0-curl, php7.0-json, php7.0-xml, php7.0-mbstring]
pecl_packages: [php-zip]
xdebug:
install: '1'