2016-01-22 21:57:29 +07:00
|
|
|
---
|
|
|
|
|
2022-10-06 19:47:06 +07:00
|
|
|
- name: Install opcache/apcu on Debian
|
|
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
block:
|
2016-02-27 19:05:02 +07:00
|
|
|
|
2021-09-01 14:57:23 +07:00
|
|
|
- name: APT | Install APCu
|
|
|
|
ansible.builtin.apt:
|
2022-02-22 19:41:02 +07:00
|
|
|
pkg: "{{ php_apcu_package }}"
|
|
|
|
install_recommends: false
|
2018-03-19 03:29:47 +07:00
|
|
|
|
2021-09-01 14:57:23 +07:00
|
|
|
- name: APT | Install Opcache
|
|
|
|
ansible.builtin.apt:
|
|
|
|
pkg: "{{ php_package_prefix }}opcache"
|
2022-02-22 19:41:02 +07:00
|
|
|
install_recommends: false
|
2018-03-19 03:29:47 +07:00
|
|
|
|
|
|
|
|
2022-10-06 19:47:06 +07:00
|
|
|
- name: Install opcache/apcu on FreeBSD
|
|
|
|
when: ansible_os_family == 'FreeBSD'
|
|
|
|
block:
|
2018-03-19 03:29:47 +07:00
|
|
|
|
2021-09-01 14:57:23 +07:00
|
|
|
- name: PKGNG | Install APCu
|
|
|
|
community.general.pkgng:
|
|
|
|
name: "php{{ php_version | replace('.', '') }}-pecl-APCu"
|
2018-03-19 03:29:47 +07:00
|
|
|
|
2021-09-01 14:57:23 +07:00
|
|
|
- name: PKGNG | Install Opcache
|
|
|
|
community.general.pkgng:
|
|
|
|
name: "{{ php_package_prefix }}opcache"
|
2018-03-19 03:29:47 +07:00
|
|
|
|
2018-03-18 23:28:57 +07:00
|
|
|
- name: TEMPLATE | Configure Opcache
|
2021-09-01 14:57:23 +07:00
|
|
|
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"
|
2021-09-01 14:57:23 +07:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2022-10-06 19:47:06 +07:00
|
|
|
notify: Restart php-fpm
|
2016-01-22 21:57:29 +07:00
|
|
|
|
|
|
|
- name: TEMPLATE | Configure APCu
|
2021-09-01 14:57:23 +07:00
|
|
|
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"
|
2021-09-01 14:57:23 +07:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2022-10-06 19:47:06 +07:00
|
|
|
notify: Restart php-fpm
|