From b70abcdbca575753d63e28ed76460379f6cdb477 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2020 00:31:05 -0400 Subject: [PATCH] Revise/Clean roles/www_options/tasks/main.yml --- roles/www_options/tasks/main.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/roles/www_options/tasks/main.yml b/roles/www_options/tasks/main.yml index 8979e3e93..7b6adc087 100644 --- a/roles/www_options/tasks/main.yml +++ b/roles/www_options/tasks/main.yml @@ -25,16 +25,13 @@ when: nginx_install | bool - debug: - msg: 'THE 4 ANSIBLE STANZAS BELOW ONLY RUN... when: (moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled' + msg: 'THE 3 ANSIBLE STANZAS BELOW ONLY RUN... when: (moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled' -- block: # 4-STANZA BLOCK BEGINS +- block: # 3-STANZA BLOCK BEGINS - # Also installed by roles/nextcloud/tasks/install.yml in case './runrole nextcloud' bypasses this role here. (Possibly make php-fpm mandatory in nginx/tasks/install.yml in future?) - - name: Install php-fpm (FastCGI Process Manager) as nec - package: - name: php-fpm + # FYI roles/nginx has already installed package php-fpm, in 3-base-server - - name: Raise 2+2 PHP default values in /etc/php/{{ php_version }}/fpm/php.ini for occasional use of WordPress/Nextcloud/Moodle/PBX (allow photos/docs up to 100MB, 100s timeouts, but preserve PHP's 128MB RAM limit) + - name: Raise 2+2 PHP default values in /etc/php/{{ php_version }}/fpm/php.ini for lightweight use of WordPress/Nextcloud/Moodle/PBX (allow photos/docs up to 100MB, 100s timeouts, but preserve PHP's 128MB RAM limit) lineinfile: path: "/etc/php/{{ php_version }}/fpm/php.ini" #path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" @@ -54,6 +51,7 @@ # COMPARE apache_allow_sudo further below. # WARNING: This might cause excess use of RAM/disk or other resources! + # The 5 values below were chosen by @ericnitschke and @kananigit in ~2018. - name: Enact nginx_high_php_limits in /etc/php/{{ php_version }}/fpm/php.ini for schools that use WordPress/Nextcloud/Moodle/PBX intensively (allow photos/docs up to 500MB, 300s timeouts, 512MB RAM limit) lineinfile: path: "/etc/php/{{ php_version }}/fpm/php.ini" @@ -73,7 +71,7 @@ name: "php{{ php_version }}-fpm" state: restarted - when: (moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled # 4-STANZA BLOCK ENDS + when: (moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled # 3-STANZA BLOCK ENDS # 'Is a "Rapid Power Off" button possible for low-electricity environments?'