Delete default pool if necessary (#10)

(when default pool 'www' not in pool list)
improve 2.4.0
Emilien M 2019-04-19 14:36:35 +02:00 committed by GitHub
parent 5abe99568a
commit 75f09eaf59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -27,3 +27,10 @@
dest: '{{ php_fpm_pool_dir }}/{{ item.pool_name }}.conf' dest: '{{ php_fpm_pool_dir }}/{{ item.pool_name }}.conf'
loop: "{{ php_fpm_poold }}" loop: "{{ php_fpm_poold }}"
notify: restart php-fpm notify: restart php-fpm
- name: FILE | Delete default pool if necessary
file:
path: "{{ php_fpm_pool_dir }}/www.conf"
state: absent
when: '"www" not in (php_fpm_poold | map(attribute="pool_name") | list)'
notify: restart php-fpm

View File

@ -11,7 +11,7 @@
php_ini_cli: php_ini_cli:
error_reporting: 'E_ALL' error_reporting: 'E_ALL'
php_fpm_poold: php_fpm_poold:
- pool_name: 'www' - pool_name: 'test_ansible'
listen: '{{ php_default_fpm_sock }}' listen: '{{ php_default_fpm_sock }}'
pm: 'dynamic' pm: 'dynamic'
pm_max_children: 250 pm_max_children: 250