From 0d74a087461c947d591b2e1d2357f1a3e06cc048 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 19 Dec 2016 12:16:42 +0100 Subject: [PATCH] library/roles/php-fpm: Fix the global variables management when we install PHP from the PPA. dnet-efg/group_vars/efg_portal_dev/main.yml: Set some PHP globals. --- php-fpm/defaults/main.yml | 1 + php-fpm/tasks/main.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php-fpm/defaults/main.yml b/php-fpm/defaults/main.yml index 93644c6..e0b0d30 100644 --- a/php-fpm/defaults/main.yml +++ b/php-fpm/defaults/main.yml @@ -10,6 +10,7 @@ php_ppa: ppa:ondrej/php php_version: 5 phpfpm_base_dir: '/etc/php{{ php_version }}/fpm' +phpfpm_cli_dir: '/etc/php{{ php_version }}/cli' # Change to when using the PPA # phpfpm_base_dir: '/etc/php/{{ php_version }}/fpm' diff --git a/php-fpm/tasks/main.yml b/php-fpm/tasks/main.yml index 89a7559..2a1acf8 100644 --- a/php-fpm/tasks/main.yml +++ b/php-fpm/tasks/main.yml @@ -28,9 +28,8 @@ tags: [ 'php', 'php_ini' ] - name: Modify the global php cli settings - ini_file: dest=/etc/php{{ php_version}}/cli/php.ini section={{ item.section | default('PHP') }} option={{ item.option }} value={{ item.value }} backup=yes state={{ item.state | default('present') }} + ini_file: dest={{ phpfpm_cli_dir }}/php.ini section={{ item.section | default('PHP') }} option={{ item.option }} value={{ item.value }} backup=yes state={{ item.state | default('present') }} with_items: '{{ php_global_settings | default([]) }}' - notify: Reload php-fpm tags: [ 'php', 'php_ini' ] - name: Activate the memcache sessions support and redundancy if needed