Improve template with check and correct error
This commit is contained in:
parent
c3f9ffd6a2
commit
96fa945288
|
@ -2,9 +2,10 @@
|
|||
- include_tasks: configure.yml
|
||||
|
||||
- name: Add pool
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: pool.j2
|
||||
dest: "/etc/php/{{ php_version }}/fpm/pool.d/{{ item.name }}.conf"
|
||||
validate: "/usr/sbin/php-fpm{{ php_version }} -t -y %s"
|
||||
notify:
|
||||
- reload php
|
||||
loop: "{{ php_pool }}"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[{{ item.name }}]
|
||||
|
||||
listen = {{ item.listen | default('/run/php/'item.name'.sock')}}
|
||||
listen = {{ item.listen | default("/run/php/{{item.name}}.sock")}}
|
||||
listen.owner = {{ item.user }}
|
||||
listen.group = {{ item.group }}
|
||||
listen.mode = 0660
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = {{ item.max_children | default('4') }}
|
||||
pm.max_children = {{ item.max_children | efault('4') }}
|
||||
pm.start_servers = {{ item.start_servers | default('1') }}
|
||||
pm.min_spare_servers = {{ item.min_spare_servers | default('1') }}
|
||||
pm.max_spare_servers = {{ item.max_spare_servers | default('1') }}
|
||||
|
|
Loading…
Reference in New Issue