From 81004687c822a2f9bd18dd9b8408a03a1d3cdc95 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Dec 2022 08:36:45 -0500 Subject: [PATCH 1/5] www_options/tasks/set-php-limits.yml run on demand (by 5 roles) --- roles/matomo/tasks/install.yml | 7 + roles/moodle/tasks/install.yml | 5 + roles/nextcloud/tasks/install.yml | 5 + roles/pbx/tasks/freepbx.yml | 5 + roles/wordpress/tasks/install.yml | 6 + roles/www_options/tasks/main.yml | 82 +--------- roles/www_options/tasks/set-php-limits.yml | 177 +++++++++++++++++++++ vars/default_vars.yml | 3 +- vars/local_vars_large.yml | 3 +- vars/local_vars_medium.yml | 3 +- vars/local_vars_small.yml | 3 +- vars/local_vars_unittest.yml | 3 +- 12 files changed, 216 insertions(+), 86 deletions(-) create mode 100644 roles/www_options/tasks/set-php-limits.yml diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index a85577936..694d34c7f 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -2,6 +2,7 @@ # Version 3 of the GNU General Public License. We modified this code and applied it here in April 2022. The derived sections correspond to the tasks running # from "HTTP Get Welcome" through "Finish Matomo Setup", lines 45 through 156. + - name: "WARNING: './runrole --reinstall matomo' CAN FAIL AS OF 2022-06-15, e.g. if /library/www/matomo already exists" meta: noop @@ -10,6 +11,12 @@ # TASK [matomo : HTTP Get Welcome] *************************************************************************************************************************************** # fatal: [127.0.0.1]: FAILED! => {"cache_control": "private, no-cache, no-store", "changed": false, "connection": "close", "content_type": "text/html; charset=utf-8", "date": "Wed, 15 Jun 2022 05:07:41 GMT", "elapsed": 0, "expires": "Thu, 19 Nov 1981 08:52:00 GMT", "msg": "Status code was 500 and not [200]: HTTP Error 500: Internal Server Error", "pragma": "no-cache", "redirected": false, "server": "nginx/1.18.0 (Ubuntu)", "set_cookie": "MATOMO_SESSID=psak3aem27vrdrt8t2f016600f; path=/; HttpOnly; SameSite=Lax", "status": 500, "transfer_encoding": "chunked", "url": "http://box.lan/matomo/index.php?action=welcome", "x_matomo_request_id": "fbfd2"} + +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits is undefined + + - name: Start MariaDB #action: service name=mysql state=started systemd: diff --git a/roles/moodle/tasks/install.yml b/roles/moodle/tasks/install.yml index 734730cde..0ab9c921e 100644 --- a/roles/moodle/tasks/install.yml +++ b/roles/moodle/tasks/install.yml @@ -17,6 +17,11 @@ name: postgresql +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: True' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits is undefined + + # 2021-07-02: Let's monitor & learn from these 2 pages year-by-year: # https://docs.moodle.org/19/en/PHP_settings_by_Moodle_version#PHP_Extensions_and_libraries # https://github.com/moodlebox/moodlebox/blob/master/roles/packages/vars/main.yml diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 1d6e135cc..eb6f350bb 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -40,6 +40,11 @@ # var: php_new +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits is undefined + + # February 2020: See @m-anish's PR #2119 and follow-up PR #2258. # 2021-07-06: If you're running Nextcloud 22+ in production, carefully check the latest required AND recommended prereqs: # https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/roles/pbx/tasks/freepbx.yml b/roles/pbx/tasks/freepbx.yml index 5480e7722..471bb4b82 100644 --- a/roles/pbx/tasks/freepbx.yml +++ b/roles/pbx/tasks/freepbx.yml @@ -2,6 +2,11 @@ # https://github.com/iiab/iiab/tree/master/roles/pbx#readme +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits is undefined + + # 2021-08-04: Non-native systemd service 'asterisk.service' (redirects via # systemd-sysv-install, to '/etc/init.d/asterisk status' etc) is Enabled but # Not Active at this point. diff --git a/roles/wordpress/tasks/install.yml b/roles/wordpress/tasks/install.yml index a22710438..3dfd96cbf 100644 --- a/roles/wordpress/tasks/install.yml +++ b/roles/wordpress/tasks/install.yml @@ -11,6 +11,12 @@ # and security enhancements using timestamps under /library/wordpress, as these # can arise without warning when WordPress is online, since WordPress ~4.8 + +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits is undefined + + # 2021-06-29: PHP modules, covering "RECOMMENDED" and "OPTIONAL" sections here: # https://make.wordpress.org/hosting/handbook/server-environment/ - name: Install libsodium23 + 8 PHP packages (run 'php -m' or 'php -i' to verify) diff --git a/roles/www_options/tasks/main.yml b/roles/www_options/tasks/main.yml index 4138c59ad..dc59083f0 100644 --- a/roles/www_options/tasks/main.yml +++ b/roles/www_options/tasks/main.yml @@ -51,87 +51,7 @@ when: lxde_pi_autostart_present.stat.exists and chromium_present.stat.exists -- debug: - msg: 'THE 5 ANSIBLE STANZAS BELOW ONLY RUN... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install' - -- block: # 5-STANZA BLOCK BEGINS - - # roles/nginx has installed pkg 'php{{ php_version }}-fpm' in 3-base-server - - - name: "Enact 'nginx_high_php_limits: False' in /etc/php/{{ php_version }}/fpm/php.ini for LIGHTWEIGHT use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 100MB, 100s timeouts, with 2 PHP system defaults: memory_limit = 128M, max_input_vars = 1000)" - lineinfile: - path: /etc/php/{{ php_version }}/fpm/php.ini # COMPARE /etc/php/{{ php_version }}/cli/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" - with_items: - - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 100M ; default is 2M' } - - { regexp: '^post_max_size', line: 'post_max_size = 100M ; default is 8M' } - - { regexp: '^max_execution_time', line: 'max_execution_time = 100 ; default is 30' } - - { regexp: '^max_input_time', line: 'max_input_time = 100 ; default is 60' } - - { regexp: '^memory_limit', line: 'memory_limit = 128M ; default is 128M / Nextcloud requests 512M' } - - { regexp: '^max_input_vars', line: 'max_input_vars = 1000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } - when: not nginx_high_php_limits and not moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install - - - name: "Enact 'nginx_high_php_limits: False' in /etc/php/{{ php_version }}/cli/php.ini for LIGHTWEIGHT use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 100MB, 100s timeouts, with 2 PHP system defaults: memory_limit = 128M, max_input_vars = 1000)" - lineinfile: - path: /etc/php/{{ php_version }}/cli/php.ini # COMPARE /etc/php/{{ php_version }}/fpm/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" - with_items: - - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 100M ; default is 2M' } - - { regexp: '^post_max_size', line: 'post_max_size = 100M ; default is 8M' } - - { regexp: '^max_execution_time', line: 'max_execution_time = 100 ; default is 30' } - - { regexp: '^max_input_time', line: 'max_input_time = 100 ; default is 60' } - - { regexp: '^memory_limit', line: 'memory_limit = 128M ; default is -1 (i.e. no limit) / Nextcloud requests 512M' } - - { regexp: '^max_input_vars', line: 'max_input_vars = 1000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } - when: not nginx_high_php_limits and not moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install - - # WARNING: This might cause excess use of RAM/disk or other resources! - # The first 5 values below were chosen by @ericnitschke and @kananigit on - # 2018-09-19: https://github.com/iiab/iiab/issues/1147 - - # 2020-03-08: IIAB DOES NOT SUPPORT UNINSTALLING APPS, so additional - # clauses (to reset/restore PHP's defaults) are not necessary at this time. - - # 2021-06-28: WITH PHP 8, MOODLE'S CLI INSTALLER UNFORTUNATELY *REQUIRES* - # editing /etc/php/{{ php_version }}/cli/php.ini (below) -- though during - # regular operation it uses: .../fpm/php.ini - # And in the past it used: .../apache2/php.ini - - - name: "Enact 'nginx_high_php_limits: True' in /etc/php/{{ php_version }}/fpm/php.ini for Moodle or INTENSIVE use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 500MB, 300s timeouts, memory_limit = 512M for Nextcloud, max_input_vars = 5000 for Moodle)" - lineinfile: - path: /etc/php/{{ php_version }}/fpm/php.ini # COMPARE /etc/php/{{ php_version }}/cli/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" - with_items: - - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' } - - { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' } - - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } - - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } - - { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is 128M / Nextcloud requests 512M' } - - { regexp: '^max_input_vars', line: 'max_input_vars = 5000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } - when: nginx_high_php_limits or moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install - - - name: "Enact 'nginx_high_php_limits: True' in /etc/php/{{ php_version }}/cli/php.ini for Moodle or INTENSIVE use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 500MB, 300s timeouts, memory_limit = 512M for Nextcloud, max_input_vars = 5000 for Moodle)" - lineinfile: - path: /etc/php/{{ php_version }}/cli/php.ini # COMPARE /etc/php/{{ php_version }}/fpm/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" - with_items: - - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' } - - { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' } - - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } - - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } - - { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is -1 (i.e. no limit) / Nextcloud requests 512M' } - - { regexp: '^max_input_vars', line: 'max_input_vars = 5000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } - when: nginx_high_php_limits or moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install - - - name: Restart 'php{{ php_version }}-fpm' systemd service - systemd: - name: php{{ php_version }}-fpm - state: restarted - - when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install # 5-STANZA BLOCK ENDS. COMPARE apache_allow_sudo conditionals below. +# 2022-12-29: set-php-limits.yml run on demand (by roles that need it) # 'Is a "Rapid Power Off" button possible for low-electricity environments?' diff --git a/roles/www_options/tasks/set-php-limits.yml b/roles/www_options/tasks/set-php-limits.yml new file mode 100644 index 000000000..e71c22c99 --- /dev/null +++ b/roles/www_options/tasks/set-php-limits.yml @@ -0,0 +1,177 @@ +# As of 2022-12-29, this is invoked by: +# +# roles/matomo/tasks/install.yml +# roles/moodle/tasks/install.yml +# roles/nextcloud/tasks/install.yml +# roles/pbx/tasks/freepbx.yml +# roles/wordpress/tasks/install.yml + +# Ansible's ini_file would normally be best, to tweak .ini files: +# https://docs.ansible.com/ansible/latest/collections/community/general/ini_file_module.html +# +# But in this case, explanatory comments (inserted by lineinfile below) offer +# important context to implementers modifying both php.ini files after the fact. + + +# WARNING: 'nginx_high_php_limits: True' (especially!) might cause excess use of +# RAM/disk or other resources! Five original values below chosen by @kananigit +# and @ericnitschke on 2018-09-19: https://github.com/iiab/iiab/issues/1147 + +# 2020-03-08: IIAB DOES NOT SUPPORT UNINSTALLING APPS, so additional clauses +# (to reset/restore PHP's own defaults) are not necessary at this time. + +# 2021-06-28: WITH PHP 8.x, MOODLE'S CLI INSTALLER UNFORTUNATELY *REQUIRES* +# editing /etc/php/{{ php_version }}/cli/php.ini (below) -- though during +# regular operation it uses: .../fpm/php.ini +# And in the past it used: .../apache2/php.ini + + +- name: "Enact 'nginx_high_php_limits: False' in /etc/php/{{ php_version }}/fpm/php.ini for LIGHTWEIGHT use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 100MB, 100s timeouts, with 2 PHP system defaults: memory_limit = 128M, max_input_vars = 1000)" + lineinfile: + path: /etc/php/{{ php_version }}/fpm/php.ini # COMPARE /etc/php/{{ php_version }}/cli/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + with_items: + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 100M ; default is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size = 100M ; default is 8M' } + - { regexp: '^max_execution_time', line: 'max_execution_time = 100 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time = 100 ; default is 60' } + - { regexp: '^memory_limit', line: 'memory_limit = 128M ; default is 128M / Nextcloud requests 512M' } + - { regexp: '^max_input_vars', line: 'max_input_vars = 1000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } + when: not nginx_high_php_limits and not moodle_install + +- name: "Enact 'nginx_high_php_limits: False' in /etc/php/{{ php_version }}/cli/php.ini for LIGHTWEIGHT use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 100MB, 100s timeouts, with 2 PHP system defaults: memory_limit = 128M, max_input_vars = 1000)" + lineinfile: + path: /etc/php/{{ php_version }}/cli/php.ini # COMPARE /etc/php/{{ php_version }}/fpm/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + with_items: + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 100M ; default is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size = 100M ; default is 8M' } + - { regexp: '^max_execution_time', line: 'max_execution_time = 100 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time = 100 ; default is 60' } + - { regexp: '^memory_limit', line: 'memory_limit = 128M ; default is -1 (i.e. no limit) / Nextcloud requests 512M' } + - { regexp: '^max_input_vars', line: 'max_input_vars = 1000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } + when: not nginx_high_php_limits and not moodle_install + + +- name: "Enact 'nginx_high_php_limits: True' in /etc/php/{{ php_version }}/fpm/php.ini for Moodle or INTENSIVE use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 500MB, 300s timeouts, memory_limit = 512M for Nextcloud, max_input_vars = 5000 for Moodle)" + lineinfile: + path: /etc/php/{{ php_version }}/fpm/php.ini # COMPARE /etc/php/{{ php_version }}/cli/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + with_items: + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' } + - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } + - { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is 128M / Nextcloud requests 512M' } + - { regexp: '^max_input_vars', line: 'max_input_vars = 5000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } + when: nginx_high_php_limits or moodle_install + +- name: "Enact 'nginx_high_php_limits: True' in /etc/php/{{ php_version }}/cli/php.ini for Moodle or INTENSIVE use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 500MB, 300s timeouts, memory_limit = 512M for Nextcloud, max_input_vars = 5000 for Moodle)" + lineinfile: + path: /etc/php/{{ php_version }}/cli/php.ini # COMPARE /etc/php/{{ php_version }}/fpm/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + with_items: + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' } + - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } + - { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is -1 (i.e. no limit) / Nextcloud requests 512M' } + - { regexp: '^max_input_vars', line: 'max_input_vars = 5000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } + when: nginx_high_php_limits or moodle_install + + +- name: Restart 'php{{ php_version }}-fpm' systemd service + systemd: + name: php{{ php_version }}-fpm + state: restarted + +- name: "Set 'set_php_limits: True' so set-php-limits.yml runs just once (per Ansible run)" + set_fact: + set_php_limits: True + + +# - debug: +# msg: 'THE 5 ANSIBLE STANZAS BELOW ONLY RUN... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install' + +# - block: # 5-STANZA BLOCK BEGINS + +# # roles/nginx has installed pkg 'php{{ php_version }}-fpm' in 3-base-server + +# - name: "Enact 'nginx_high_php_limits: False' in /etc/php/{{ php_version }}/fpm/php.ini for LIGHTWEIGHT use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 100MB, 100s timeouts, with 2 PHP system defaults: memory_limit = 128M, max_input_vars = 1000)" +# lineinfile: +# path: /etc/php/{{ php_version }}/fpm/php.ini # COMPARE /etc/php/{{ php_version }}/cli/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini +# regexp: "{{ item.regexp }}" +# line: "{{ item.line }}" +# with_items: +# - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 100M ; default is 2M' } +# - { regexp: '^post_max_size', line: 'post_max_size = 100M ; default is 8M' } +# - { regexp: '^max_execution_time', line: 'max_execution_time = 100 ; default is 30' } +# - { regexp: '^max_input_time', line: 'max_input_time = 100 ; default is 60' } +# - { regexp: '^memory_limit', line: 'memory_limit = 128M ; default is 128M / Nextcloud requests 512M' } +# - { regexp: '^max_input_vars', line: 'max_input_vars = 1000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } +# when: not nginx_high_php_limits and not moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install + +# - name: "Enact 'nginx_high_php_limits: False' in /etc/php/{{ php_version }}/cli/php.ini for LIGHTWEIGHT use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 100MB, 100s timeouts, with 2 PHP system defaults: memory_limit = 128M, max_input_vars = 1000)" +# lineinfile: +# path: /etc/php/{{ php_version }}/cli/php.ini # COMPARE /etc/php/{{ php_version }}/fpm/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini +# regexp: "{{ item.regexp }}" +# line: "{{ item.line }}" +# with_items: +# - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 100M ; default is 2M' } +# - { regexp: '^post_max_size', line: 'post_max_size = 100M ; default is 8M' } +# - { regexp: '^max_execution_time', line: 'max_execution_time = 100 ; default is 30' } +# - { regexp: '^max_input_time', line: 'max_input_time = 100 ; default is 60' } +# - { regexp: '^memory_limit', line: 'memory_limit = 128M ; default is -1 (i.e. no limit) / Nextcloud requests 512M' } +# - { regexp: '^max_input_vars', line: 'max_input_vars = 1000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } +# when: not nginx_high_php_limits and not moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install + +# # WARNING: This might cause excess use of RAM/disk or other resources! +# # The first 5 values below were chosen by @ericnitschke and @kananigit on +# # 2018-09-19: https://github.com/iiab/iiab/issues/1147 + +# # 2020-03-08: IIAB DOES NOT SUPPORT UNINSTALLING APPS, so additional +# # clauses (to reset/restore PHP's defaults) are not necessary at this time. + +# # 2021-06-28: WITH PHP 8, MOODLE'S CLI INSTALLER UNFORTUNATELY *REQUIRES* +# # editing /etc/php/{{ php_version }}/cli/php.ini (below) -- though during +# # regular operation it uses: .../fpm/php.ini +# # And in the past it used: .../apache2/php.ini + +# - name: "Enact 'nginx_high_php_limits: True' in /etc/php/{{ php_version }}/fpm/php.ini for Moodle or INTENSIVE use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 500MB, 300s timeouts, memory_limit = 512M for Nextcloud, max_input_vars = 5000 for Moodle)" +# lineinfile: +# path: /etc/php/{{ php_version }}/fpm/php.ini # COMPARE /etc/php/{{ php_version }}/cli/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini +# regexp: "{{ item.regexp }}" +# line: "{{ item.line }}" +# with_items: +# - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' } +# - { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' } +# - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } +# - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } +# - { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is 128M / Nextcloud requests 512M' } +# - { regexp: '^max_input_vars', line: 'max_input_vars = 5000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } +# when: nginx_high_php_limits or moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install + +# - name: "Enact 'nginx_high_php_limits: True' in /etc/php/{{ php_version }}/cli/php.ini for Moodle or INTENSIVE use of Matomo/Nextcloud/PBX/WordPress (allow photos/docs up to 500MB, 300s timeouts, memory_limit = 512M for Nextcloud, max_input_vars = 5000 for Moodle)" +# lineinfile: +# path: /etc/php/{{ php_version }}/cli/php.ini # COMPARE /etc/php/{{ php_version }}/fpm/php.ini AND /etc/php/{{ php_version }}/apache2/php.ini +# regexp: "{{ item.regexp }}" +# line: "{{ item.line }}" +# with_items: +# - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' } +# - { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' } +# - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } +# - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } +# - { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is -1 (i.e. no limit) / Nextcloud requests 512M' } +# - { regexp: '^max_input_vars', line: 'max_input_vars = 5000 ; default is 1000 / Moodle 3.11+ requires 5000+ with PHP 8+' } +# when: nginx_high_php_limits or moodle_install # REMINDER: THIS ENTIRE 5-STANZA BLOCK IS ONLY INVOKED... when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install + +# - name: Restart 'php{{ php_version }}-fpm' systemd service +# systemd: +# name: php{{ php_version }}-fpm +# state: restarted + +# when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install # 5-STANZA BLOCK ENDS. COMPARE apache_allow_sudo conditionals below. diff --git a/vars/default_vars.yml b/vars/default_vars.yml index d35902105..57768b92d 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -504,7 +504,8 @@ postgresql_enabled: False # Warning: Moodle is a serious LMS, that takes a while to install. moodle_install: False moodle_enabled: False -# If using Moodle intensively, set nginx_high_php_limits further above. +# FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, +# as auto-enacted by roles/www_options/tasks/set-php-limits.yml # Regional OSM vector maps use far less disk space than bitmap/raster versions. # Instructions: https://github.com/iiab/iiab/wiki/IIAB-Maps diff --git a/vars/local_vars_large.yml b/vars/local_vars_large.yml index e6452da31..96a5e27f3 100644 --- a/vars/local_vars_large.yml +++ b/vars/local_vars_large.yml @@ -296,7 +296,8 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: True moodle_enabled: True -# If using Moodle intensively, set nginx_high_php_limits further above. +# FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, +# as auto-enacted by roles/www_options/tasks/set-php-limits.yml # Regional OSM vector maps use far less disk space than bitmap/raster versions. # Instructions: https://github.com/iiab/iiab/wiki/IIAB-Maps diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index ed29a7cfc..086acca50 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -296,7 +296,8 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False -# If using Moodle intensively, set nginx_high_php_limits further above. +# FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, +# as auto-enacted by roles/www_options/tasks/set-php-limits.yml # Regional OSM vector maps use far less disk space than bitmap/raster versions. # Instructions: https://github.com/iiab/iiab/wiki/IIAB-Maps diff --git a/vars/local_vars_small.yml b/vars/local_vars_small.yml index 3c97b6536..efda0cd4c 100644 --- a/vars/local_vars_small.yml +++ b/vars/local_vars_small.yml @@ -296,7 +296,8 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install. moodle_install: False moodle_enabled: False -# If using Moodle intensively, set nginx_high_php_limits further above. +# FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, +# as auto-enacted by roles/www_options/tasks/set-php-limits.yml # Regional OSM vector maps use far less disk space than bitmap/raster versions. # Instructions: https://github.com/iiab/iiab/wiki/IIAB-Maps diff --git a/vars/local_vars_unittest.yml b/vars/local_vars_unittest.yml index 8356deef1..f96fb415b 100644 --- a/vars/local_vars_unittest.yml +++ b/vars/local_vars_unittest.yml @@ -296,7 +296,8 @@ kiwix_enabled: False # Warning: Moodle is a serious LMS, that takes a while to install. moodle_install: False moodle_enabled: False -# If using Moodle intensively, set nginx_high_php_limits further above. +# FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, +# as auto-enacted by roles/www_options/tasks/set-php-limits.yml # Regional OSM vector maps use far less disk space than bitmap/raster versions. # Instructions: https://github.com/iiab/iiab/wiki/IIAB-Maps From b597913886050e3e15511be03f11259fc232d895 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 29 Dec 2022 09:05:19 -0500 Subject: [PATCH 2/5] Clarify explanation at top of set-php-limits.yml --- roles/www_options/tasks/set-php-limits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/www_options/tasks/set-php-limits.yml b/roles/www_options/tasks/set-php-limits.yml index e71c22c99..345bc41f6 100644 --- a/roles/www_options/tasks/set-php-limits.yml +++ b/roles/www_options/tasks/set-php-limits.yml @@ -1,4 +1,4 @@ -# As of 2022-12-29, this is invoked by: +# 2022-12-29: This file (set-php-limits.yml) is invoked on demand, by: # # roles/matomo/tasks/install.yml # roles/moodle/tasks/install.yml From eba3225b7c7c16805e32d8da8076991a38de5122 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Dec 2022 10:29:01 -0500 Subject: [PATCH 3/5] Rename flag to set_php_limits_done (so it runs once at most, per Ansible run) --- roles/matomo/tasks/install.yml | 2 +- roles/moodle/tasks/install.yml | 2 +- roles/nextcloud/tasks/install.yml | 2 +- roles/pbx/tasks/freepbx.yml | 2 +- roles/wordpress/tasks/install.yml | 2 +- roles/www_options/tasks/set-php-limits.yml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index 694d34c7f..4280de403 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -14,7 +14,7 @@ - name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits is undefined + when: set_php_limits_done is undefined - name: Start MariaDB diff --git a/roles/moodle/tasks/install.yml b/roles/moodle/tasks/install.yml index 0ab9c921e..4e39ddebe 100644 --- a/roles/moodle/tasks/install.yml +++ b/roles/moodle/tasks/install.yml @@ -19,7 +19,7 @@ - name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: True' by default" include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits is undefined + when: set_php_limits_done is undefined # 2021-07-02: Let's monitor & learn from these 2 pages year-by-year: diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index eb6f350bb..35e80a825 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -42,7 +42,7 @@ - name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits is undefined + when: set_php_limits_done is undefined # February 2020: See @m-anish's PR #2119 and follow-up PR #2258. diff --git a/roles/pbx/tasks/freepbx.yml b/roles/pbx/tasks/freepbx.yml index 471bb4b82..cc976e97f 100644 --- a/roles/pbx/tasks/freepbx.yml +++ b/roles/pbx/tasks/freepbx.yml @@ -4,7 +4,7 @@ - name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits is undefined + when: set_php_limits_done is undefined # 2021-08-04: Non-native systemd service 'asterisk.service' (redirects via diff --git a/roles/wordpress/tasks/install.yml b/roles/wordpress/tasks/install.yml index 3dfd96cbf..b2bcd27b9 100644 --- a/roles/wordpress/tasks/install.yml +++ b/roles/wordpress/tasks/install.yml @@ -14,7 +14,7 @@ - name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits is undefined + when: set_php_limits_done is undefined # 2021-06-29: PHP modules, covering "RECOMMENDED" and "OPTIONAL" sections here: diff --git a/roles/www_options/tasks/set-php-limits.yml b/roles/www_options/tasks/set-php-limits.yml index e71c22c99..b9ee0b0a5 100644 --- a/roles/www_options/tasks/set-php-limits.yml +++ b/roles/www_options/tasks/set-php-limits.yml @@ -89,9 +89,9 @@ name: php{{ php_version }}-fpm state: restarted -- name: "Set 'set_php_limits: True' so set-php-limits.yml runs just once (per Ansible run)" +- name: "Set 'set_php_limits_done: True' so set-php-limits.yml runs just once (per Ansible run)" set_fact: - set_php_limits: True + set_php_limits_done: True # - debug: From 2a7eba7297290f25152a6f92ffff434845e70dfc Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Dec 2022 11:48:17 -0500 Subject: [PATCH 4/5] Set PHP limits right after PHP reqs/recs, so each role installs smoothly --- roles/matomo/tasks/install.yml | 2 ++ roles/moodle/tasks/install.yml | 10 +++++----- roles/nextcloud/tasks/install.yml | 9 ++++----- roles/pbx/tasks/freepbx.yml | 9 ++++----- roles/wordpress/tasks/install.yml | 10 +++++----- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index 4280de403..8c18720d7 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -12,6 +12,8 @@ # fatal: [127.0.0.1]: FAILED! => {"cache_control": "private, no-cache, no-store", "changed": false, "connection": "close", "content_type": "text/html; charset=utf-8", "date": "Wed, 15 Jun 2022 05:07:41 GMT", "elapsed": 0, "expires": "Thu, 19 Nov 1981 08:52:00 GMT", "msg": "Status code was 500 and not [200]: HTTP Error 500: Internal Server Error", "pragma": "no-cache", "redirected": false, "server": "nginx/1.18.0 (Ubuntu)", "set_cookie": "MATOMO_SESSID=psak3aem27vrdrt8t2f016600f; path=/; HttpOnly; SameSite=Lax", "status": 500, "transfer_encoding": "chunked", "url": "http://box.lan/matomo/index.php?action=welcome", "x_matomo_request_id": "fbfd2"} +# (Install Matomo's PHP requirements / recommendations here, e.g. 6 extensions) + - name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" include_tasks: roles/www_options/tasks/set-php-limits.yml when: set_php_limits_done is undefined diff --git a/roles/moodle/tasks/install.yml b/roles/moodle/tasks/install.yml index 4e39ddebe..a39ba33ac 100644 --- a/roles/moodle/tasks/install.yml +++ b/roles/moodle/tasks/install.yml @@ -17,11 +17,6 @@ name: postgresql -- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: True' by default" - include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits_done is undefined - - # 2021-07-02: Let's monitor & learn from these 2 pages year-by-year: # https://docs.moodle.org/19/en/PHP_settings_by_Moodle_version#PHP_Extensions_and_libraries # https://github.com/moodlebox/moodlebox/blob/master/roles/packages/vars/main.yml @@ -49,6 +44,11 @@ - php{{ php_version }}-zip # 2021-06-27: Likewise installed in nextcloud/tasks/install.yml, pbx/tasks/freepbx_dependencies.yml, wordpress/tasks/install.yml state: present +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: True' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits_done is undefined + + - name: "MOODLE PRE-RELEASE TESTING: Download (clone) {{ moodle_repo_url }} branch 'master' to {{ moodle_base }} (~389 MB initially, ~416 MB later) if OS PHP {{ php_version }} >= 8.2" git: repo: "{{ moodle_repo_url }}" # https://github.com/moodle/moodle diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 35e80a825..9352d65cc 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -40,11 +40,6 @@ # var: php_new -- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" - include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits_done is undefined - - # February 2020: See @m-anish's PR #2119 and follow-up PR #2258. # 2021-07-06: If you're running Nextcloud 22+ in production, carefully check the latest required AND recommended prereqs: # https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -91,6 +86,10 @@ # state: present # when: php_version is version('8.0', '<') +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits_done is undefined + - name: Create dir {{ nextcloud_root_dir }} (by default 755 dirs & 644 files) file: diff --git a/roles/pbx/tasks/freepbx.yml b/roles/pbx/tasks/freepbx.yml index cc976e97f..45d28b2a3 100644 --- a/roles/pbx/tasks/freepbx.yml +++ b/roles/pbx/tasks/freepbx.yml @@ -2,11 +2,6 @@ # https://github.com/iiab/iiab/tree/master/roles/pbx#readme -- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" - include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits_done is undefined - - # 2021-08-04: Non-native systemd service 'asterisk.service' (redirects via # systemd-sysv-install, to '/etc/init.d/asterisk status' etc) is Enabled but # Not Active at this point. @@ -67,6 +62,10 @@ # state: present # when: php_version is version('8.0', '<') +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits_done is undefined + - name: FreePBX - Install and configure Apache - if pbx_use_apache include_tasks: apache.yml when: pbx_use_apache diff --git a/roles/wordpress/tasks/install.yml b/roles/wordpress/tasks/install.yml index b2bcd27b9..db9f30087 100644 --- a/roles/wordpress/tasks/install.yml +++ b/roles/wordpress/tasks/install.yml @@ -12,11 +12,6 @@ # can arise without warning when WordPress is online, since WordPress ~4.8 -- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" - include_tasks: roles/www_options/tasks/set-php-limits.yml - when: set_php_limits_done is undefined - - # 2021-06-29: PHP modules, covering "RECOMMENDED" and "OPTIONAL" sections here: # https://make.wordpress.org/hosting/handbook/server-environment/ - name: Install libsodium23 + 8 PHP packages (run 'php -m' or 'php -i' to verify) @@ -44,6 +39,11 @@ # state: present # when: php_version is version('8.0', '<') +- name: "Run roles/www_options/tasks/set-php-limits.yml with 'nginx_high_php_limits: False' by default" + include_tasks: roles/www_options/tasks/set-php-limits.yml + when: set_php_limits_done is undefined + + - name: Delete {{ downloads_dir }}/wordpress.tar.gz if it exists file: path: "{{ downloads_dir }}/wordpress.tar.gz" From 6f06bfacd0c17458ac521af4ff4bf3152aaec9e6 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Dec 2022 01:15:09 +0530 Subject: [PATCH 5/5] Allow post-install toggling of nginx_high_php_limits --- roles/www_options/tasks/main.yml | 7 ++++++- vars/default_vars.yml | 2 +- vars/local_vars_large.yml | 2 +- vars/local_vars_medium.yml | 2 +- vars/local_vars_small.yml | 2 +- vars/local_vars_unittest.yml | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/roles/www_options/tasks/main.yml b/roles/www_options/tasks/main.yml index dc59083f0..59754f749 100644 --- a/roles/www_options/tasks/main.yml +++ b/roles/www_options/tasks/main.yml @@ -51,7 +51,12 @@ when: lxde_pi_autostart_present.stat.exists and chromium_present.stat.exists -# 2022-12-29: set-php-limits.yml run on demand (by roles that need it) +# 2022-12-29: set-php-limits.yml is ALSO attempted (on demand) by every +# /tasks/install.yml that needs it (Matomo, Moodle, Nextcloud, PBX, +# WordPress) so './runrole ' and similar are fully self-sufficient! +- name: "Run set-php-limits.yml -- allows post-install toggling of nginx_high_php_limits in /etc/iiab/local_vars.yml -- if you run './runrole www_options'" + include_tasks: set-php-limits.yml + when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install # 'Is a "Rapid Power Off" button possible for low-electricity environments?' diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 57768b92d..a79ec1e13 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -346,7 +346,7 @@ nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # roles/www_options & roles/moodle FORCE high limits if 'moodle_install: True' # REGARDLESS: AFTER INSTALLING IIAB, PLEASE VERIFY THESE 6 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L133 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/set-php-limits.yml # ...ARE SUITABLE FOR YOUR HARDWARE, as saved in: /etc/php//*/php.ini # ALSO: ADJUST "client_max_body_size 500M;" AS NEC, IN: /etc/nginx/server.conf diff --git a/vars/local_vars_large.yml b/vars/local_vars_large.yml index 96a5e27f3..6793fe878 100644 --- a/vars/local_vars_large.yml +++ b/vars/local_vars_large.yml @@ -214,7 +214,7 @@ nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # roles/www_options & roles/moodle FORCE high limits if 'moodle_install: True' # REGARDLESS: AFTER INSTALLING IIAB, PLEASE VERIFY THESE 6 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L133 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/set-php-limits.yml # ...ARE SUITABLE FOR YOUR HARDWARE, as saved in: /etc/php//*/php.ini # ALSO: ADJUST "client_max_body_size 500M;" AS NEC, IN: /etc/nginx/server.conf diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 086acca50..6cfc82613 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -214,7 +214,7 @@ nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # roles/www_options & roles/moodle FORCE high limits if 'moodle_install: True' # REGARDLESS: AFTER INSTALLING IIAB, PLEASE VERIFY THESE 6 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L133 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/set-php-limits.yml # ...ARE SUITABLE FOR YOUR HARDWARE, as saved in: /etc/php//*/php.ini # ALSO: ADJUST "client_max_body_size 500M;" AS NEC, IN: /etc/nginx/server.conf diff --git a/vars/local_vars_small.yml b/vars/local_vars_small.yml index efda0cd4c..e12612962 100644 --- a/vars/local_vars_small.yml +++ b/vars/local_vars_small.yml @@ -214,7 +214,7 @@ nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # roles/www_options & roles/moodle FORCE high limits if 'moodle_install: True' # REGARDLESS: AFTER INSTALLING IIAB, PLEASE VERIFY THESE 6 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L133 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/set-php-limits.yml # ...ARE SUITABLE FOR YOUR HARDWARE, as saved in: /etc/php//*/php.ini # ALSO: ADJUST "client_max_body_size 500M;" AS NEC, IN: /etc/nginx/server.conf diff --git a/vars/local_vars_unittest.yml b/vars/local_vars_unittest.yml index f96fb415b..8b683f492 100644 --- a/vars/local_vars_unittest.yml +++ b/vars/local_vars_unittest.yml @@ -214,7 +214,7 @@ nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # roles/www_options & roles/moodle FORCE high limits if 'moodle_install: True' # REGARDLESS: AFTER INSTALLING IIAB, PLEASE VERIFY THESE 6 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L133 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/set-php-limits.yml # ...ARE SUITABLE FOR YOUR HARDWARE, as saved in: /etc/php//*/php.ini # ALSO: ADJUST "client_max_body_size 500M;" AS NEC, IN: /etc/nginx/server.conf