mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-02-24 09:23:29 +07:00
Improvements (#13)
- Store configuration in local facts - Better socket generator - php_admin_value/php_value - Manages PHP 7.4 on Debian
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
; Start a new pool named '{{ item.pool_name }}'.
|
||||
; Start a new pool named '{{ item.name }}'.
|
||||
; the variable $pool can we used in any directive and will be replaced by the
|
||||
; pool name ('{{ item.pool_name }}' here)
|
||||
[{{ item.pool_name }}]
|
||||
; pool name ('{{ item.name }}' here)
|
||||
[{{ item.name }}]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
@@ -20,8 +20,8 @@
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = {{ item.user | default(php_default_user_group) }}
|
||||
group = {{ item.group | default(php_default_user_group) }}
|
||||
user = {{ item.user }}
|
||||
group = {{ item.group }}
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
@@ -95,7 +95,7 @@ listen.group = {{ item.listen_owner | default(php_default_user_group) }}
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = {{ item.pm }}
|
||||
pm = {{ item.pm | default('dynamic') }}
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
@@ -106,27 +106,27 @@ pm = {{ item.pm }}
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = {{ item.pm_max_children }}
|
||||
pm.max_children = {{ item.pm_max_children | default('250') }}
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = {{ item.pm_start_servers }}
|
||||
pm.start_servers = {{ item.pm_start_servers | default('10') }}
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = {{ item.pm_min_spare_servers }}
|
||||
pm.min_spare_servers = {{ item.pm_min_spare_servers | default('10') }}
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = {{ item.pm_max_spare_servers }}
|
||||
pm.max_spare_servers = {{ item.pm_max_spare_servers | default('20') }}
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
pm.process_idle_timeout = {{ item.pm_process_idle_timeout | default('10s') }};
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
@@ -369,7 +369,7 @@ chdir = /
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
;catch_workers_output = yes
|
||||
catch_workers_output = {{ item.catch_workers_output | default('no') }}
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
@@ -421,12 +421,10 @@ chdir = /
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
||||
{% if item.php_flag is defined %}
|
||||
{% for k, v in item.php_flag.items() %}
|
||||
{% for k, v in item.php_value.items() | list %}
|
||||
php_value[{{ k }}] = {{ v }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.php_admin_flag is defined %}
|
||||
{% for k, v in item.php_admin_flag.items() %}
|
||||
{% for k, v in item.php_admin_value.items() | list %}
|
||||
php_admin_value[{{ k }}] = {{ v }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
; vim:filetype=dosini
|
||||
|
||||
Reference in New Issue
Block a user