diff --git a/tasks/opcache.yml b/tasks/opcache.yml index 1a26595..42f1f9a 100644 --- a/tasks/opcache.yml +++ b/tasks/opcache.yml @@ -1,19 +1,19 @@ --- -- name: APT | Install php-apcu - apt: pkg=php5-apcu state=latest - when: php_version == 5 +- name: APT | Install APCu / Opcache + apt: pkg={{ item }} state=latest + with_items: + - "{{ php_apt_prefix }}apcu" + - "{{ php_apt_prefix }}opcache" - name: TEMPLATE | Configure APCu template: > src=etc/__php__/mods-available/opcache.ini.j2 dest="{{ php_mods_dir }}/opcache.ini" notify: restart php-fpm - when: php_version == 5 - name: TEMPLATE | Configure APCu template: > src=etc/__php__/mods-available/apcu.ini.j2 dest={{ php_mods_dir }}/apcu.ini notify: restart php-fpm - when: php_version == 5 diff --git a/templates/etc/__php__/mods-available/apcu.ini.j2 b/templates/etc/__php__/mods-available/apcu.ini.j2 index 2f946de..59afd0c 100644 --- a/templates/etc/__php__/mods-available/apcu.ini.j2 +++ b/templates/etc/__php__/mods-available/apcu.ini.j2 @@ -2,7 +2,7 @@ ; {{ ansible_managed }} ; -extension={{ php_apc_package }}.so +extension=apcu.so ; apc.enabled can be set to 0 to disable APC apc.enable={{ php_apc_enable }}