From b0572da1d66cc7a5206e2f4053310f7e5b83ac86 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Fri, 24 Jul 2015 09:49:16 +0200 Subject: [PATCH] Fix loading APC/APCu --- tasks/php54max.yml | 3 +++ tasks/php55min.yml | 3 +++ templates/etc/php5/mods-available/apcu.ini.j2 | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/php54max.yml b/tasks/php54max.yml index 75a5c6d..22605c4 100644 --- a/tasks/php54max.yml +++ b/tasks/php54max.yml @@ -3,6 +3,9 @@ - name: APT | Install php-apcu apt: pkg=php-apc state=latest +- name: SET_FACT | Set APC + set_fact: php_apc_package="apc" + - name: TEMPLATE | Configure APC template: src=etc/php5/mods-available/apcu.ini.j2 dest=/etc/php5/mods-available/apc.ini notify: restart php-fpm diff --git a/tasks/php55min.yml b/tasks/php55min.yml index 5f63bf2..460dfc1 100644 --- a/tasks/php55min.yml +++ b/tasks/php55min.yml @@ -3,6 +3,9 @@ - name: APT | Install php-apcu apt: pkg=php5-apcu state=latest +- name: SET_FACT | Set APCu + set_fact: php_apc_package="apcu" + - name: TEMPLATE | Configure Opcache / APCu template: src=etc/php5/mods-available/{{ item }}.ini.j2 dest=/etc/php5/mods-available/{{ item }}.ini with_items: diff --git a/templates/etc/php5/mods-available/apcu.ini.j2 b/templates/etc/php5/mods-available/apcu.ini.j2 index 1f68cbc..2f946de 100644 --- a/templates/etc/php5/mods-available/apcu.ini.j2 +++ b/templates/etc/php5/mods-available/apcu.ini.j2 @@ -2,7 +2,7 @@ ; {{ ansible_managed }} ; -extension=apc.so +extension={{ php_apc_package }}.so ; apc.enabled can be set to 0 to disable APC apc.enable={{ php_apc_enable }}