ansible-php/tasks/opcache.yml

44 lines
999 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
2021-08-31 15:51:29 +07:00
- name: APT | Install APCu
2021-08-31 18:02:57 +07:00
ansible.builtin.apt:
2021-08-31 15:51:29 +07:00
pkg: "php-apcu"
2018-03-19 03:29:47 +07:00
2021-08-31 15:51:29 +07:00
- name: APT | Install Opcache
2021-08-31 18:02:57 +07:00
ansible.builtin.apt:
2021-08-31 15:51:29 +07:00
pkg: "{{ php_package_prefix }}opcache"
2018-03-19 03:29:47 +07:00
when: ansible_os_family == 'Debian'
- block:
2021-08-31 15:51:29 +07:00
- name: PKGNG | Install APCu
2021-08-31 18:02:57 +07:00
ansible.builtin.pkgng:
2021-08-31 15:51:29 +07:00
name: "php{{ php_version | replace('.', '') }}-pecl-APCu"
2018-03-19 03:29:47 +07:00
2021-08-31 15:51:29 +07:00
- name: PKGNG | Install Opcache
2021-08-31 18:02:57 +07:00
ansible.builtin.pkgng:
2021-08-31 15:51:29 +07:00
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
2021-08-31 18:02:57 +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-08-31 15:51:29 +07:00
owner: root
group: root
mode: 0644
2016-01-22 21:57:29 +07:00
notify: restart php-fpm
- name: TEMPLATE | Configure APCu
2021-08-31 18:02:57 +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-08-31 15:51:29 +07:00
owner: root
group: root
mode: 0644
2016-01-22 21:57:29 +07:00
notify: restart php-fpm