36 lines
828 B
YAML
36 lines
828 B
YAML
---
|
|
|
|
- name: ASSERT | Check variables
|
|
assert:
|
|
that: "php_version in php_managed_versions"
|
|
|
|
- name: INCLUDE_VARS | Related to PHP version
|
|
include_vars: "php-{{ php_version }}.yml"
|
|
|
|
- name: APT | Install PHP packages
|
|
apt: pkg={{ item }} state=latest update_cache=yes cache_valid_time=3600
|
|
with_flattened:
|
|
- "{{ php_packages }}"
|
|
- "{{ php_extra_packages }}"
|
|
|
|
- name: INCLUDE | PHP-FPM
|
|
include: fpm.yml
|
|
when: php_install_fpm
|
|
|
|
- name: LINEINFILE | PHP configuration
|
|
lineinfile: >
|
|
dest='{{ php_etc_dir }}/cli/php.ini'
|
|
regexp='^;?{{ item.key }}'
|
|
line='{{ item.key }} = {{ item.value }}'
|
|
with_flattened:
|
|
- "{{ php_ini }}"
|
|
- "{{ php_ini_cli }}"
|
|
|
|
- name: INCLUDE | Xdebug
|
|
include: xdebug.yml
|
|
when: php_install_xdebug
|
|
|
|
- name: APT | Install and configure opcache
|
|
include: opcache.yml
|
|
|