From 1b4ea6e85932f6ad397bfa3fc986870f4be533ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sun, 25 Mar 2018 22:32:16 +0200 Subject: [PATCH 1/4] whitespaces --- php/tasks/fpm.yml | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/php/tasks/fpm.yml b/php/tasks/fpm.yml index 06dc4202..2369f483 100644 --- a/php/tasks/fpm.yml +++ b/php/tasks/fpm.yml @@ -5,8 +5,8 @@ name: '{{ item }}' state: present with_items: - - php5-fpm - - php5 + - php5-fpm + - php5 when: ansible_distribution_release == "jessie" - name: "Install PHP FPM packages (Debian 9 or later)" @@ -14,8 +14,8 @@ name: '{{ item }}' state: present with_items: - - php-fpm - - php + - php-fpm + - php when: ansible_distribution_major_version | version_compare('9', '>=') - name: "Set config files for FPM (jessie)" @@ -43,12 +43,12 @@ mode: "0644" create: yes with_items: - - { option: "short_open_tag", value: "Off" } - - { option: "expose_php", value: "Off" } - - { option: "display_errors", value: "Off" } - - { option: "log_errors", value: "On" } - - { option: "html_errors", value: "Off" } - - { option: "allow_url_fopen", value: "Off" } + - { option: "short_open_tag", value: "Off" } + - { option: "expose_php", value: "Off" } + - { option: "display_errors", value: "Off" } + - { option: "log_errors", value: "On" } + - { option: "html_errors", value: "Off" } + - { option: "allow_url_fopen", value: "Off" } - name: Disable PHP functions for FPM ini_file: @@ -73,15 +73,15 @@ mode: "0644" create: yes with_items: - - { option: "pm", value: "ondemand" } - - { option: "pm.max_children", value: "100" } - - { option: "pm.process_idle_timeout", value: "10s" } - - { option: "slowlog", value: "log/$pool.log.slow" } - - { option: "request_slowlog_timeout", value: "5s" } - - { option: "pm.status_path", value: "/fpm_status" } - - { option: "request_terminate_timeout", value: "60s" } - - { option: "chroot", value: "/var/www/html" } 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" } + - { option: "slowlog", value: "log/$pool.log.slow" } + - { option: "request_slowlog_timeout", value: "5s" } + - { option: "pm.status_path", value: "/fpm_status" } + - { option: "request_terminate_timeout", value: "60s" } + - { option: "chroot", value: "/var/www/html" } - name: Custom PHP FPM values copy: @@ -99,6 +99,5 @@ value: "{{ item.value }}" mode: "0644" with_items: - - { option: "date.timezone", value: "Europe/Paris" } + - { option: "date.timezone", value: "Europe/Paris" } when: php_symfony_requirements - From d4da36ffa7a2fe5b9f205e6db87d12bb29804d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sun, 25 Mar 2018 22:32:37 +0200 Subject: [PATCH 2/4] php: restart fpm if needed --- php/tasks/fpm.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/php/tasks/fpm.yml b/php/tasks/fpm.yml index 2369f483..5b27251d 100644 --- a/php/tasks/fpm.yml +++ b/php/tasks/fpm.yml @@ -49,6 +49,7 @@ - { option: "log_errors", value: "On" } - { option: "html_errors", value: "Off" } - { option: "allow_url_fopen", value: "Off" } + notify: restart php-fpm - name: Disable PHP functions for FPM ini_file: @@ -56,6 +57,7 @@ section: PHP option: disable_functions value: "exec,shell-exec,system,passthru,putenv,popen" + notify: restart php-fpm - name: Custom php.ini for FPM copy: @@ -63,6 +65,7 @@ content: | ; Put customized values here. force: no + notify: restart php-fpm - name: Set default PHP FPM values ini_file: @@ -82,6 +85,7 @@ - { option: "pm.status_path", value: "/fpm_status" } - { option: "request_terminate_timeout", value: "60s" } - { option: "chroot", value: "/var/www/html" } + notify: restart php-fpm - name: Custom PHP FPM values copy: @@ -90,6 +94,7 @@ ; Put customized values here. ; default_charset = "ISO-8859-1" force: no + notify: restart php-fpm - name: "Set custom values for PHP to enable Symfony" ini_file: @@ -100,4 +105,5 @@ mode: "0644" with_items: - { option: "date.timezone", value: "Europe/Paris" } + notify: restart php-fpm when: php_symfony_requirements From 3d4733fc1345f8e93927207229bc01fdcf411278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sun, 25 Mar 2018 22:33:31 +0200 Subject: [PATCH 3/4] php: fix fpm custom file permissions --- php/tasks/fpm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/php/tasks/fpm.yml b/php/tasks/fpm.yml index 5b27251d..b7d169b4 100644 --- a/php/tasks/fpm.yml +++ b/php/tasks/fpm.yml @@ -93,6 +93,7 @@ content: | ; Put customized values here. ; default_charset = "ISO-8859-1" + mode: "0644" force: no notify: restart php-fpm From 690318e4350f877fe9051da7fb9215ac9a3bb52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Mon, 26 Mar 2018 21:53:32 +0200 Subject: [PATCH 4/4] Update CHANGELOG for php changes --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b852b93b..7908077f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ The **patch** part changes incrementally at each release. * nginx: package name can be specified (default: `nginx-full`) * evolinux-base: Exec the firewall tasks sooner (to avoid dependency issues) * webapps/evoadmin-web: Fail if variable evoadmin_contact_email isn't defined +* php: fix FPM custom file permissions +* php: more tasks notify FPM handler to restart if needed ### Fixed * nginx: fix basic auth for default vhost