php: default FPM pool can be removed/not-installed

This commit is contained in:
Jérémy Lecour 2018-03-25 22:34:42 +02:00
parent d78cb1dbef
commit de38ecd881
2 changed files with 20 additions and 1 deletions

View file

@ -4,3 +4,4 @@ php_sury_enable: False
php_fpm_enable: False
php_apache_enable: False
php_symfony_requirements: False
php_fpm_add_www_pool: True

View file

@ -76,7 +76,6 @@
mode: "0644"
create: yes
with_items:
when: ansible_distribution_major_version | version_compare('9', '>=')
- { option: "pm", value: "ondemand" }
- { option: "pm.max_children", value: "100" }
- { option: "pm.process_idle_timeout", value: "10s" }
@ -86,6 +85,9 @@
- { option: "request_terminate_timeout", value: "60s" }
- { option: "chroot", value: "/var/www/html" }
notify: restart php-fpm
when:
- php_fpm_add_www_pool | bool
- ansible_distribution_major_version | version_compare('9', '>=')
- name: Custom PHP FPM values
copy:
@ -96,6 +98,22 @@
mode: "0644"
force: no
notify: restart php-fpm
when:
- php_fpm_add_www_pool | bool
- ansible_distribution_major_version | version_compare('9', '>=')
- name: Disable FPM www pool
file:
dest: "{{ item }}"
state: absent
with_items:
- /etc/php/7.0/fpm/pool.d/www.conf
- "{{ php_fpm_defaults_file }}"
- "{{ php_fpm_custom_file }}"
notify: restart php-fpm
when:
- not (php_fpm_add_www_pool | bool)
- ansible_distribution_major_version | version_compare('9', '>=')
- name: "Set custom values for PHP to enable Symfony"
ini_file: