ansible-php/tasks/opcache.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

2016-01-22 21:57:29 +07:00
---
- name: Install opcache/apcu on Debian
when: ansible_os_family == 'Debian'
block:
2016-02-27 19:05:02 +07:00
- name: APT | Install APCu
ansible.builtin.apt:
pkg: "{{ php_apcu_package }}"
install_recommends: false
2018-03-19 03:29:47 +07:00
- name: APT | Install Opcache
ansible.builtin.apt:
pkg: "{{ php_package_prefix }}opcache"
install_recommends: false
2018-03-19 03:29:47 +07:00
- name: Install opcache/apcu on FreeBSD
when: ansible_os_family == 'FreeBSD'
block:
2018-03-19 03:29:47 +07:00
- 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
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
notify: Restart php-fpm
2016-01-22 21:57:29 +07:00
- 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
notify: Restart php-fpm