From 9c0173dad07e60a68572b9e9bfa4a8fc211499c4 Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Fri, 14 Aug 2015 07:04:59 +0000 Subject: [PATCH] Recursively merge php.ini options --- php/ng/cli/ini.sls | 8 +++++++- php/ng/fpm/config.sls | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/php/ng/cli/ini.sls b/php/ng/cli/ini.sls index b6256e4..1a167fd 100644 --- a/php/ng/cli/ini.sls +++ b/php/ng/cli/ini.sls @@ -3,7 +3,13 @@ {% from "php/ng/ini.jinja" import php_ini %} {% set settings = php.ini.defaults %} -{% do settings.update(php.cli.ini.settings) %} +{% for key, value in php.cli.ini.settings.iteritems() %} + {% if settings[key] is defined %} + {% do settings[key].update(value) %} + {% else %} + {% do settings.update({key: value}) %} + {% endif %} +{% endfor %} php_cli_ini: {{ php_ini(php.lookup.cli.ini, php.cli.ini.opts, settings) }} diff --git a/php/ng/fpm/config.sls b/php/ng/fpm/config.sls index 844b5ba..f54b50e 100644 --- a/php/ng/fpm/config.sls +++ b/php/ng/fpm/config.sls @@ -3,7 +3,13 @@ {% from "php/ng/ini.jinja" import php_ini %} {% set ini_settings = php.ini.defaults %} -{% do ini_settings.update(php.fpm.config.ini.settings) %} +{% for key, value in php.fpm.config.ini.settings.iteritems() %} + {% if ini_settings[key] is defined %} + {% do ini_settings[key].update(value) %} + {% else %} + {% do ini_settings.update({key: value}) %} + {% endif %} +{% endfor %} {% set conf_settings = php.lookup.fpm.defaults %} {% do conf_settings.update(php.fpm.config.conf.settings) %}