ansible-php/tasks/opcache.yml

38 lines
785 B
YAML
Raw Normal View History

2016-01-22 21:57:29 +07:00
---
2018-03-19 03:29:47 +07:00
- block:
2016-02-27 19:05:02 +07:00
2018-03-19 03:29:47 +07:00
- name: APT | Install APCu
apt:
pkg: "php-apcu"
2018-03-19 03:29:47 +07:00
- name: APT | Install Opcache
apt:
pkg: "{{ php_package_prefix }}opcache"
when: ansible_os_family == 'Debian'
- block:
- name: PKGNG | Install APCu
pkgng:
name: "php{{ php_version | replace('.', '') }}-pecl-APCu"
- name: PKGNG | Install Opcache
pkgng:
name: "{{ php_package_prefix }}opcache"
when: ansible_os_family == 'FreeBSD'
2016-01-22 21:57:29 +07:00
2018-03-18 23:28:57 +07:00
- name: TEMPLATE | Configure Opcache
template:
src: "etc/__php__/mods-available/opcache.ini.j2"
dest: "{{ php_mods_dir }}/opcache.ini"
2016-01-22 21:57:29 +07:00
notify: restart php-fpm
- name: TEMPLATE | Configure APCu
2018-03-18 23:28:57 +07:00
template:
src: "etc/__php__/mods-available/apcu.ini.j2"
dest: "{{ php_mods_dir }}/apcu.ini"
2016-01-22 21:57:29 +07:00
notify: restart php-fpm