|
| 1 | +Upstream-PR: WIP — to be presented to IIAB upstream |
| 2 | +Upstream-Status: open |
| 3 | +Applies-to: roles/nginx/tasks/install.yml, roles/matomo/tasks/install.yml |
| 4 | +Summary: Move php-fpm ownership from nginx to the roles that use it — nginx no longer manages php-fpm (both proot and non-proot), Matomo enables its own. Stops idle php-fpm running by default (K2GO-386). Carried for our build; WIP for upstream (pairs with every php role self-managing). |
| 5 | + |
| 6 | +diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml |
| 7 | +index 65bf441..eceddd1 100644 |
| 8 | +--- a/roles/matomo/tasks/install.yml |
| 9 | ++++ b/roles/matomo/tasks/install.yml |
| 10 | +@@ -47,6 +47,10 @@ |
| 11 | + include_tasks: roles/www_options/tasks/php-settings.yml |
| 12 | + when: php_settings_done is undefined |
| 13 | + |
| 14 | ++- name: Enable 'php-fpm' via pdsm (proot) so Matomo owns its php-fpm (do not rely on the nginx role) |
| 15 | ++ command: pdsm enable php-fpm |
| 16 | ++ when: is_proot |
| 17 | ++ |
| 18 | + - name: Start 'php-fpm' via pdsm (proot) |
| 19 | + command: pdsm start php-fpm |
| 20 | + register: pdsm_start |
| 21 | +diff --git a/roles/nginx/tasks/install.yml b/roles/nginx/tasks/install.yml |
| 22 | +index 2d24a48..4b9ad3a 100644 |
| 23 | +--- a/roles/nginx/tasks/install.yml |
| 24 | ++++ b/roles/nginx/tasks/install.yml |
| 25 | +@@ -64,22 +64,6 @@ |
| 26 | + msg: roles/nginx/tasks/homepage.yml will run LATER (invoked by roles/www_options/tasks/main.yml) SO THAT NGINX CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url) |
| 27 | + # - include_tasks: roles/nginx/tasks/homepage.yml |
| 28 | + |
| 29 | +-- name: Restart php{{ php_version }}-fpm systemd service |
| 30 | +- systemd: |
| 31 | +- name: "php{{ php_version }}-fpm" |
| 32 | +- state: restarted |
| 33 | +- when: not is_proot |
| 34 | +- |
| 35 | +-- name: Enable & Restart recently installed 'php-fpm' via pdsm (proot) |
| 36 | +- when: is_proot |
| 37 | +- block: |
| 38 | +- - name: Enable 'php-fpm' via pdsm (proot) |
| 39 | +- command: pdsm enable php-fpm |
| 40 | +- |
| 41 | +- - name: Restart 'php-fpm' via pdsm (proot) |
| 42 | +- command: pdsm restart php-fpm |
| 43 | +- |
| 44 | +- |
| 45 | + # RECORD NGINX AS INSTALLED |
| 46 | + |
| 47 | + - name: Record (final) disk space used |
0 commit comments