From b44c4338e76fc0753ef3f07884bc91e89ee6bd50 Mon Sep 17 00:00:00 2001 From: wenzong Date: Thu, 20 Aug 2015 14:34:29 +0800 Subject: [PATCH] Make `php_apc_conf_filename` and `php_opcache_conf_filename` configurable. --- tasks/main.yml | 10 ++++++++++ vars/Debian.yml | 4 ++-- vars/RedHat.yml | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 11e8d95..8840ced 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,6 +23,16 @@ php_extension_conf_path: "{{ __php_extension_conf_path }}" when: php_extension_conf_path is not defined +- name: Define php_apc_conf_filename. + set_fact: + php_apc_conf_filename: "{{ __php_apc_conf_filename }}" + when: php_apc_conf_filename is not defined + +- name: Define php_opcache_conf_filename. + set_fact: + php_opcache_conf_filename: "{{ __php_opcache_conf_filename }}" + when: php_opcache_conf_filename is not defined + # Setup/install tasks. - include: setup-RedHat.yml when: (php_install_from_source == false) and (ansible_os_family == 'RedHat') diff --git a/vars/Debian.yml b/vars/Debian.yml index 52d3298..7875d6e 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -18,6 +18,6 @@ __php_webserver_daemon: "apache2" __php_conf_path: "{{ '/etc/php5' if php_webserver_daemon and php_webserver_daemon != 'apache2' else '/etc/php5/apache2' }}" __php_extension_conf_path: "{{ __php_conf_path }}/conf.d" -php_apc_conf_filename: 20-apc.ini -php_opcache_conf_filename: 05-opcache.ini +__php_apc_conf_filename: 20-apc.ini +__php_opcache_conf_filename: 05-opcache.ini php_fpm_daemon: php5-fpm diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 7e3e303..4e5d8de 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -20,6 +20,6 @@ __php_webserver_daemon: "httpd" __php_conf_path: /etc php_extension_conf_path: /etc/php.d -php_apc_conf_filename: apc.ini -php_opcache_conf_filename: opcache.ini +__php_apc_conf_filename: apc.ini +__php_opcache_conf_filename: opcache.ini php_fpm_daemon: php-fpm