ansible-php/tasks/opcache.yml

44 lines
1003 B
YAML
Raw Permalink 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
- name: APT | Install APCu
ansible.builtin.apt:
pkg: "php-apcu"
2018-03-19 03:29:47 +07:00
- name: APT | Install Opcache
ansible.builtin.apt:
pkg: "{{ php_package_prefix }}opcache"
2018-03-19 03:29:47 +07:00
when: ansible_os_family == 'Debian'
- block:
- name: PKGNG | Install APCu
community.general.pkgng:
name: "php{{ php_version | replace('.', '') }}-pecl-APCu"
2018-03-19 03:29:47 +07:00
- name: PKGNG | Install Opcache
community.general.pkgng:
name: "{{ php_package_prefix }}opcache"
2018-03-19 03:29:47 +07:00
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
ansible.builtin.template:
2018-03-18 23:28:57 +07:00
src: "etc/__php__/mods-available/opcache.ini.j2"
dest: "{{ php_mods_dir }}/opcache.ini"
owner: root
group: root
mode: 0644
2016-01-22 21:57:29 +07:00
notify: restart php-fpm
- name: TEMPLATE | Configure APCu
ansible.builtin.template:
2018-03-18 23:28:57 +07:00
src: "etc/__php__/mods-available/apcu.ini.j2"
dest: "{{ php_mods_dir }}/apcu.ini"
owner: root
group: root
mode: 0644
2016-01-22 21:57:29 +07:00
notify: restart php-fpm