2015-07-22 14:40:20 +07:00
|
|
|
---
|
2015-07-23 15:40:33 +07:00
|
|
|
|
|
|
|
- name: APT | Install PHP packages
|
|
|
|
apt: pkg={{ item }} state=latest update_cache=yes cache_valid_time=3600
|
2015-07-23 23:10:17 +07:00
|
|
|
with_flattened:
|
2015-07-23 15:40:33 +07:00
|
|
|
- php_packages
|
|
|
|
- php_extra_packages
|
|
|
|
|
|
|
|
- name: INCLUDE | PHP-FPM
|
2015-07-23 22:10:15 +07:00
|
|
|
include: fpm.yml
|
2015-07-23 15:40:33 +07:00
|
|
|
when: php_install_fpm
|
|
|
|
|
2015-07-23 23:10:17 +07:00
|
|
|
- name: SHELL | Get PHP version on apt
|
2015-07-23 15:40:33 +07:00
|
|
|
shell: LANG=C apt-cache policy php5 2>&1 | awk '/Candidate:/ { print $2 }'
|
|
|
|
register: php_apt_version
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
- name: APT | Install and configure php-apcu / opcache (PHP 5.5+ only)
|
|
|
|
include: php55min.yml
|
|
|
|
when: php_apt_version.stdout|version_compare('5.5', 'ge', False)
|
|
|
|
|
|
|
|
- name: APT | Install and configure php-apc (PHP 5.4 max only)
|
|
|
|
include: php54max.yml
|
|
|
|
when: php_apt_version.stdout|version_compare('5.5', 'lt', False)
|
|
|
|
|