Merge pull request #1 from IventureGroup/master
Add possibility to define default values for php-fpm pools
This commit is contained in:
commit
68610ddae6
@ -10,6 +10,12 @@
|
|||||||
{% set pool_states = [] %}
|
{% set pool_states = [] %}
|
||||||
|
|
||||||
{% for pool, config in php.fpm.pools.iteritems() %}
|
{% for pool, config in php.fpm.pools.iteritems() %}
|
||||||
|
{% if pool == 'defaults' %}{% continue %}{% endif %}
|
||||||
|
{% for pkey, pvalues in config.get('settings', {}).iteritems() %}
|
||||||
|
{% set pool_defaults = php.fpm.pools.get('defaults', {}).copy() %}
|
||||||
|
{% do pool_defaults.update(pvalues) %}
|
||||||
|
{% do pvalues.update(pool_defaults) %}
|
||||||
|
{% endfor %}
|
||||||
{% set state = 'php_fpm_pool_conf_' ~ loop.index0 %}
|
{% set state = 'php_fpm_pool_conf_' ~ loop.index0 %}
|
||||||
{% set fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %}
|
{% set fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %}
|
||||||
|
|
||||||
|
@ -93,6 +93,12 @@ php:
|
|||||||
|
|
||||||
# settings for fpm-pools
|
# settings for fpm-pools
|
||||||
pools:
|
pools:
|
||||||
|
# defaults will apply for each pools settings and can be overwritten by pool settings
|
||||||
|
defaults:
|
||||||
|
user: nginx
|
||||||
|
group: nginx
|
||||||
|
listen: /var/run/php-fpm-default.sock
|
||||||
|
|
||||||
# name of the pool file to be managed, this will be appended
|
# name of the pool file to be managed, this will be appended
|
||||||
# to the path specified in php.ng.lookup.fpm.pools
|
# to the path specified in php.ng.lookup.fpm.pools
|
||||||
'mypool.conf':
|
'mypool.conf':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user