2014-05-20 21:59:25 +02:00
|
|
|
# Manages the php-fpm main ini file
|
2014-05-22 20:38:27 +02:00
|
|
|
{% from 'php/ng/map.jinja' import php with context %}
|
2014-06-06 19:14:44 +02:00
|
|
|
{% from "php/ng/ini.jinja" import php_ini %}
|
2014-05-20 21:59:25 +02:00
|
|
|
|
|
|
|
{% set ini_settings = php.ini.defaults %}
|
2018-03-10 17:06:25 +01:00
|
|
|
{% for key, value in php.fpm.config.ini.settings.items() %}
|
2015-08-14 09:04:59 +02:00
|
|
|
{% if ini_settings[key] is defined %}
|
|
|
|
{% do ini_settings[key].update(value) %}
|
|
|
|
{% else %}
|
|
|
|
{% do ini_settings.update({key: value}) %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2014-05-20 21:59:25 +02:00
|
|
|
|
|
|
|
{% set conf_settings = php.lookup.fpm.defaults %}
|
|
|
|
{% do conf_settings.update(php.fpm.config.conf.settings) %}
|
|
|
|
|
|
|
|
php_fpm_ini_config:
|
2014-06-06 19:14:44 +02:00
|
|
|
{{ php_ini(php.lookup.fpm.ini, php.fpm.config.ini.opts, ini_settings) }}
|
2014-05-20 21:59:25 +02:00
|
|
|
|
|
|
|
php_fpm_conf_config:
|
2014-06-06 19:14:44 +02:00
|
|
|
{{ php_ini(php.lookup.fpm.conf, php.fpm.config.conf.opts, conf_settings) }}
|
2017-08-29 19:54:48 +02:00
|
|
|
|
|
|
|
{{ php.lookup.fpm.pools }}:
|
|
|
|
file.directory:
|
|
|
|
- name: {{ php.lookup.fpm.pools }}
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- file_mode: 755
|
|
|
|
- make_dirs: True
|