From 4e0cc2ee01a3cdff0fba5a626a640bdac7dec65c Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 7 Mar 2020 02:02:52 -0500 Subject: [PATCH 1/9] Fix WordPress posting in wordpress-nginx.conf.j2 --- roles/wordpress/templates/wordpress-nginx.conf.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/wordpress/templates/wordpress-nginx.conf.j2 b/roles/wordpress/templates/wordpress-nginx.conf.j2 index d6f98c185..2c023dc2e 100644 --- a/roles/wordpress/templates/wordpress-nginx.conf.j2 +++ b/roles/wordpress/templates/wordpress-nginx.conf.j2 @@ -1,6 +1,7 @@ location {{ wp_url }} { #rewrite_log on; root {{ content_base }}; + try_files $uri $uri/ /wordpress/index.php$is_args$args; location ~ .*\.php$ { From 4fa38d65d663e525e5df66c032e814237278cd6b Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 7 Mar 2020 02:32:41 -0500 Subject: [PATCH 2/9] Establish IIAB defaults in fpm/php.ini (do WordPress & Moodle take advantage?) --- roles/www_front_end/tasks/main.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/roles/www_front_end/tasks/main.yml b/roles/www_front_end/tasks/main.yml index aa1d8b6ed..02835a434 100644 --- a/roles/www_front_end/tasks/main.yml +++ b/roles/www_front_end/tasks/main.yml @@ -25,7 +25,7 @@ when: nginx_install | bool -- block: # 3-STANZA BLOCK BEGINS +- block: # 4-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 @@ -37,7 +37,21 @@ # COMPARE apache_allow_sudo further below. - - name: Enact high limits in /etc/php/{{ php_version }}/fpm/php.ini if using WordPress/Nextcloud/Moodle intensively, as nec + - name: Enact IIAB defaults in /etc/php/{{ php_version }}/fpm/php.ini for WordPress/Nextcloud/Moodle (allow photos/docs up to 100MB, 128MB RAM, 300s timeouts) + lineinfile: + path: "/etc/php/{{ php_version }}/fpm/php.ini" + #path: "/etc/php/{{ php_version }}/{{ apache_service }}/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: '^memory_limit', line: 'memory_limit = 128M ; default is 128M / Nextcloud requests 512M' } + - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } + when: not nginx_high_php_limits + + - name: Enact high limits in /etc/php/{{ php_version }}/fpm/php.ini for WordPress/Nextcloud/Moodle (allow photos/docs up to 500MB, 512MB RAM, 300s timeouts) lineinfile: path: "/etc/php/{{ php_version }}/fpm/php.ini" #path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" @@ -49,14 +63,14 @@ - { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is 128M / Nextcloud requests 512M' } - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } - when: nginx_high_php_limits + when: nginx_high_php_limits | bool - name: Restart 'php{{ php_version }}-fpm' systemd services, as nec systemd: name: "php{{ php_version }}-fpm" state: restarted - when: (nextcloud_install or pbx_install) and nginx_enabled # 3-STANZA BLOCK ENDS + when: (moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled # 4-STANZA BLOCK ENDS # 'Is a "Rapid Power Off" button possible for low-electricity environments?' From 010a6b5fde27e6ac3a77a522efd89ba3a72d94b0 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2020 14:34:55 -0400 Subject: [PATCH 3/9] Clean/explain www_front_end/tasks/main.yml --- roles/www_front_end/tasks/main.yml | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/roles/www_front_end/tasks/main.yml b/roles/www_front_end/tasks/main.yml index 02835a434..9add4737b 100644 --- a/roles/www_front_end/tasks/main.yml +++ b/roles/www_front_end/tasks/main.yml @@ -24,6 +24,8 @@ include_tasks: roles/nginx/tasks/homepage.yml 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' - block: # 4-STANZA BLOCK BEGINS @@ -32,12 +34,7 @@ package: name: php-fpm - # For schools that use WordPress/Nextcloud/Moodle intensively. - # WARNING: Enabling this might cause excess use of RAM/disk or other resources! - - # COMPARE apache_allow_sudo further below. - - - name: Enact IIAB defaults in /etc/php/{{ php_version }}/fpm/php.ini for WordPress/Nextcloud/Moodle (allow photos/docs up to 100MB, 128MB RAM, 300s timeouts) + - 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) lineinfile: path: "/etc/php/{{ php_version }}/fpm/php.ini" #path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" @@ -46,12 +43,18 @@ 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_execution_time', line: 'max_execution_time = 300 ; default is 30' } - - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } - when: not nginx_high_php_limits + when: not nginx_high_php_limits # REMINDER: THIS ENTIRE 4-STANZA BLOCK IS ONLY INVOKED... when: (wordpress_install or nextcloud_install or moodle_install or pbx_install) and nginx_enabled - - name: Enact high limits in /etc/php/{{ php_version }}/fpm/php.ini for WordPress/Nextcloud/Moodle (allow photos/docs up to 500MB, 512MB RAM, 300s timeouts) + # 2020-03-08: IIAB does not support uninstalling apps, so a 3rd clause + # (to reset/restore PHP's defaults) is not necessary at this time. + + # COMPARE apache_allow_sudo further below. + + # WARNING: This might cause excess use of RAM/disk or other resources! + - 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" #path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" @@ -60,12 +63,12 @@ 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: '^memory_limit', line: 'memory_limit = 512M ; default is 128M / Nextcloud requests 512M' } - { 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' } when: nginx_high_php_limits | bool - - name: Restart 'php{{ php_version }}-fpm' systemd services, as nec + - name: Restart 'php{{ php_version }}-fpm' systemd service systemd: name: "php{{ php_version }}-fpm" state: restarted @@ -78,7 +81,9 @@ # COMPARE nginx_high_php_limits further above. -# 2020-02-12: DOES THE FLAG BELOW (apache_allow_sudo) WORK WITH NGINX TOO ? +# 2020-03-08: DOES THE FLAG BELOW (apache_allow_sudo) PRESUMABLY WORK +# WITH NGINX TOO ? (The single-click poweroff button on IIAB's home +# page certainly does still work with NGINX.) - name: Give {{ apache_user }} (per variable apache_user) permission to poweroff, installing /etc/sudoers.d/020_apache_poweroff from template template: From 5f6394112706ad61c9687330e36eaf3fd6d15202 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2020 15:26:05 -0400 Subject: [PATCH 4/9] www_back_end, www_front_end -> www_core, www_options --- roles/3-base-server/tasks/main.yml | 6 +++--- roles/4-server-options/tasks/main.yml | 10 +++++----- roles/httpd/tasks/homepage.yml | 2 +- roles/httpd/tasks/install.yml | 2 +- roles/nextcloud/README.md | 2 +- roles/nextcloud/tasks/install.yml | 2 +- roles/nginx/tasks/homepage.yml | 2 +- roles/nginx/tasks/install.yml | 4 ++-- .../files/html/assets/lang_codes.json | 0 .../files/html/css/bootstrap-theme.css | 0 .../files/html/css/bootstrap-theme.css.map | 0 .../files/html/css/bootstrap-theme.min.css | 0 .../html/css/bootstrap-theme.min.css.map | 0 .../files/html/css/bootstrap.css | 0 .../files/html/css/bootstrap.css.map | 0 .../files/html/css/bootstrap.min.css | 0 .../files/html/css/bootstrap.min.css.map | 0 .../files/html/css/bootstrap4.min.css | 0 .../files/html/css/fa.all.min.css | 0 .../files/html/css/font-faces.css | 0 .../files/html/css/xo-common.css | 0 .../bubblegum-sans-v6-latin-regular.woff | Bin .../bubblegum-sans-v6-latin-regular.woff2 | Bin .../files/html/fonts/fa-solid-900.woff | Bin .../files/html/fonts/fa-solid-900.woff2 | Bin .../fonts/finger-paint-v7-latin-regular.woff | Bin .../fonts/finger-paint-v7-latin-regular.woff2 | Bin .../html/fonts/flavors-v6-latin-regular.woff | Bin .../html/fonts/flavors-v6-latin-regular.woff2 | Bin .../fonts/freckle-face-v6-latin-regular.woff | Bin .../fonts/freckle-face-v6-latin-regular.woff2 | Bin .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../html/fonts/open-sans-v15-latin-600.woff | Bin .../html/fonts/open-sans-v15-latin-600.woff2 | Bin .../html/fonts/open-sans-v15-latin-700.woff | Bin .../html/fonts/open-sans-v15-latin-700.woff2 | Bin .../fonts/open-sans-v15-latin-regular.woff | Bin .../fonts/open-sans-v15-latin-regular.woff2 | Bin .../files/html/html/credits.html | 0 .../files/html/js/Markdown.Converter.js | 0 .../files/html/js/Markdown.Sanitizer.js | 0 .../files/html/js/XMLDisplay.js | 0 .../files/html/js/bootstrap.js | 0 .../files/html/js/bootstrap.min.js | 0 .../files/html/js/bootstrap4.min.js | 0 .../files/html/js/jquery.min.js | 0 .../files/html/services/power_off.php | 0 .../{www_back_end => www_base}/tasks/html.yml | 0 .../{www_back_end => www_base}/tasks/main.yml | 18 +++++++++--------- .../tasks/php-stem.yml | 0 .../templates/iiab-refresh-wiki-docs.sh | 0 .../tasks/main.yml | 18 +++++++++--------- .../templates/020_apache_poweroff.j2 | 0 tests/test.yml | 4 ++-- vars/default_vars.yml | 2 +- vars/local_vars_big.yml | 2 +- vars/local_vars_medium.yml | 2 +- vars/local_vars_min.yml | 2 +- 61 files changed, 39 insertions(+), 39 deletions(-) rename roles/{www_back_end => www_base}/files/html/assets/lang_codes.json (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap-theme.css (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap-theme.css.map (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap-theme.min.css (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap-theme.min.css.map (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap.css (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap.css.map (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap.min.css (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap.min.css.map (100%) rename roles/{www_back_end => www_base}/files/html/css/bootstrap4.min.css (100%) rename roles/{www_back_end => www_base}/files/html/css/fa.all.min.css (100%) rename roles/{www_back_end => www_base}/files/html/css/font-faces.css (100%) rename roles/{www_back_end => www_base}/files/html/css/xo-common.css (100%) rename roles/{www_back_end => www_base}/files/html/fonts/bubblegum-sans-v6-latin-regular.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/bubblegum-sans-v6-latin-regular.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/fonts/fa-solid-900.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/fa-solid-900.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/fonts/finger-paint-v7-latin-regular.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/finger-paint-v7-latin-regular.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/fonts/flavors-v6-latin-regular.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/flavors-v6-latin-regular.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/fonts/freckle-face-v6-latin-regular.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/freckle-face-v6-latin-regular.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/fonts/glyphicons-halflings-regular.eot (100%) rename roles/{www_back_end => www_base}/files/html/fonts/glyphicons-halflings-regular.svg (100%) rename roles/{www_back_end => www_base}/files/html/fonts/glyphicons-halflings-regular.ttf (100%) rename roles/{www_back_end => www_base}/files/html/fonts/glyphicons-halflings-regular.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/open-sans-v15-latin-600.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/open-sans-v15-latin-600.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/fonts/open-sans-v15-latin-700.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/open-sans-v15-latin-700.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/fonts/open-sans-v15-latin-regular.woff (100%) rename roles/{www_back_end => www_base}/files/html/fonts/open-sans-v15-latin-regular.woff2 (100%) rename roles/{www_back_end => www_base}/files/html/html/credits.html (100%) rename roles/{www_back_end => www_base}/files/html/js/Markdown.Converter.js (100%) rename roles/{www_back_end => www_base}/files/html/js/Markdown.Sanitizer.js (100%) rename roles/{www_back_end => www_base}/files/html/js/XMLDisplay.js (100%) rename roles/{www_back_end => www_base}/files/html/js/bootstrap.js (100%) rename roles/{www_back_end => www_base}/files/html/js/bootstrap.min.js (100%) rename roles/{www_back_end => www_base}/files/html/js/bootstrap4.min.js (100%) rename roles/{www_back_end => www_base}/files/html/js/jquery.min.js (100%) rename roles/{www_back_end => www_base}/files/html/services/power_off.php (100%) rename roles/{www_back_end => www_base}/tasks/html.yml (100%) rename roles/{www_back_end => www_base}/tasks/main.yml (70%) rename roles/{www_back_end => www_base}/tasks/php-stem.yml (100%) rename roles/{www_back_end => www_base}/templates/iiab-refresh-wiki-docs.sh (100%) rename roles/{www_front_end => www_options}/tasks/main.yml (92%) rename roles/{www_front_end => www_options}/templates/020_apache_poweroff.j2 (100%) diff --git a/roles/3-base-server/tasks/main.yml b/roles/3-base-server/tasks/main.yml index 509829cbc..ce1c43212 100644 --- a/roles/3-base-server/tasks/main.yml +++ b/roles/3-base-server/tasks/main.yml @@ -8,10 +8,10 @@ name: mysql when: mysql_install | bool -- name: WWW_BACK_END (WWW_FRONT_END should be installed later) +- name: WWW_BASE (WWW_OPTIONS should be installed later) include_role: - name: www_back_end - #when: www_back_end_install | bool + name: www_base + #when: www_base_install | bool #when: apache_install or nginx_install - name: HTTPD (Apache) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 8189e6bac..b1d0999f7 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -37,15 +37,15 @@ name: samba when: samba_install | bool -# 2020-02-12: what was roles/homepage lives in roles/www_back_end & -# roles/www_front_end for now. Eventually softcoding of iiab_home_url +# 2020-02-12: what was roles/homepage lives in roles/www_base & +# roles/www_options for now. Eventually softcoding of iiab_home_url # should happen everywhere (incl Admin Console) to allow more field # options, e.g. changing /library/www/html/home even when offline... -- name: WWW_FRONT_END (WWW_BACK_END should have been installed earlier) +- name: WWW_OPTIONS (WWW_BASE should have been installed earlier) include_role: - name: www_front_end - #when: www_front_end_install | bool + name: www_options + #when: www_options_install | bool #when: apache_install or nginx_install - name: Recording STAGE 4 HAS COMPLETED ================== diff --git a/roles/httpd/tasks/homepage.yml b/roles/httpd/tasks/homepage.yml index 25773ba31..e1c610d5f 100644 --- a/roles/httpd/tasks/homepage.yml +++ b/roles/httpd/tasks/homepage.yml @@ -1,4 +1,4 @@ -# Both invoked in 4-SERVER-OPTIONS, by roles/www_front_end/tasks/main.yml: +# Both invoked in 4-SERVER-OPTIONS, by roles/www_options/tasks/main.yml: # # httpd/tasks/homepage.yml # nginx/tasks/homepage.yml diff --git a/roles/httpd/tasks/install.yml b/roles/httpd/tasks/install.yml index 8ffd6382f..ae4a80ecf 100644 --- a/roles/httpd/tasks/install.yml +++ b/roles/httpd/tasks/install.yml @@ -157,7 +157,7 @@ # when: not apache_enabled - debug: - msg: roles/httpd/tasks/homepage.yml will run LATER (invoked by roles/www_front_end/tasks/main.yml) SO THAT APACHE CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url) + msg: roles/httpd/tasks/homepage.yml will run LATER (invoked by roles/www_options/tasks/main.yml) SO THAT APACHE CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url) # - include_tasks: roles/httpd/tasks/homepage.yml # - name: Enable & Stop '{{ apache_service }}' systemd service diff --git a/roles/nextcloud/README.md b/roles/nextcloud/README.md index d36618a2b..8fdeac0d4 100644 --- a/roles/nextcloud/README.md +++ b/roles/nextcloud/README.md @@ -33,7 +33,7 @@ To further refine Nextcloud access controls based on IPv4 addresses, you can edi - max_execution_time - max_input_time -Useful PHP recommendations for these settings (while largely tailored to WordPress, and aimed at very low-end hardware) can be found here: [/opt/iiab/iiab/roles/www_front_end/tasks/main.yml#L47-L51](../www_front_end/tasks/main.yml#L47-L51) +Useful PHP recommendations for these settings (while largely tailored to WordPress, and aimed at very low-end hardware) can be found here: [/opt/iiab/iiab/roles/www_options/tasks/main.yml#L47-L51](../www_options/tasks/main.yml#L47-L51) ## Using It diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 3d792401b..716710c8e 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -52,7 +52,7 @@ #- php-cli # NOT REQUESTED by Nextcloud #- php-common # NOT REQUESTED by Nextcloud - php-curl - - php-fpm # ALSO INSTALLED IN roles/www_back_end (Stage 3) for nginx_high_php_limits + - php-fpm # ALSO INSTALLED IN roles/www_base (Stage 3) for nginx_high_php_limits - php-gd - php-gmp # Optional (for SFTP storage) - php-imagick # Optional (for preview generation) diff --git a/roles/nginx/tasks/homepage.yml b/roles/nginx/tasks/homepage.yml index fb01aa96f..f8b2f797d 100644 --- a/roles/nginx/tasks/homepage.yml +++ b/roles/nginx/tasks/homepage.yml @@ -1,4 +1,4 @@ -# Both invoked in 4-SERVER-OPTIONS, by roles/www_front_end/tasks/main.yml: +# Both invoked in 4-SERVER-OPTIONS, by roles/www_options/tasks/main.yml: # # httpd/tasks/homepage.yml # nginx/tasks/homepage.yml diff --git a/roles/nginx/tasks/install.yml b/roles/nginx/tasks/install.yml index 2fb3f2e44..3d6c23bfb 100644 --- a/roles/nginx/tasks/install.yml +++ b/roles/nginx/tasks/install.yml @@ -46,10 +46,10 @@ #- { src: 'iiab.conf.j2', dest: "{{ nginx_conf_dir }}/iiab.conf" } # Moved into homepage.yml below - debug: - msg: roles/nginx/tasks/homepage.yml will run LATER (invoked by roles/www_front_end/tasks/main.yml) SO THAT NGINX CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url) + 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) # - include_tasks: roles/nginx/tasks/homepage.yml -# php-stem extension installed by roles/www_back_end/tasks/php-stem.yml +# php-stem extension installed by roles/www_base/tasks/php-stem.yml # here it is linked to php-fpm - name: Symlink /etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini -> /etc/php/{{ php_version }}/mods-available/stem.ini file: diff --git a/roles/www_back_end/files/html/assets/lang_codes.json b/roles/www_base/files/html/assets/lang_codes.json similarity index 100% rename from roles/www_back_end/files/html/assets/lang_codes.json rename to roles/www_base/files/html/assets/lang_codes.json diff --git a/roles/www_back_end/files/html/css/bootstrap-theme.css b/roles/www_base/files/html/css/bootstrap-theme.css similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap-theme.css rename to roles/www_base/files/html/css/bootstrap-theme.css diff --git a/roles/www_back_end/files/html/css/bootstrap-theme.css.map b/roles/www_base/files/html/css/bootstrap-theme.css.map similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap-theme.css.map rename to roles/www_base/files/html/css/bootstrap-theme.css.map diff --git a/roles/www_back_end/files/html/css/bootstrap-theme.min.css b/roles/www_base/files/html/css/bootstrap-theme.min.css similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap-theme.min.css rename to roles/www_base/files/html/css/bootstrap-theme.min.css diff --git a/roles/www_back_end/files/html/css/bootstrap-theme.min.css.map b/roles/www_base/files/html/css/bootstrap-theme.min.css.map similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap-theme.min.css.map rename to roles/www_base/files/html/css/bootstrap-theme.min.css.map diff --git a/roles/www_back_end/files/html/css/bootstrap.css b/roles/www_base/files/html/css/bootstrap.css similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap.css rename to roles/www_base/files/html/css/bootstrap.css diff --git a/roles/www_back_end/files/html/css/bootstrap.css.map b/roles/www_base/files/html/css/bootstrap.css.map similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap.css.map rename to roles/www_base/files/html/css/bootstrap.css.map diff --git a/roles/www_back_end/files/html/css/bootstrap.min.css b/roles/www_base/files/html/css/bootstrap.min.css similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap.min.css rename to roles/www_base/files/html/css/bootstrap.min.css diff --git a/roles/www_back_end/files/html/css/bootstrap.min.css.map b/roles/www_base/files/html/css/bootstrap.min.css.map similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap.min.css.map rename to roles/www_base/files/html/css/bootstrap.min.css.map diff --git a/roles/www_back_end/files/html/css/bootstrap4.min.css b/roles/www_base/files/html/css/bootstrap4.min.css similarity index 100% rename from roles/www_back_end/files/html/css/bootstrap4.min.css rename to roles/www_base/files/html/css/bootstrap4.min.css diff --git a/roles/www_back_end/files/html/css/fa.all.min.css b/roles/www_base/files/html/css/fa.all.min.css similarity index 100% rename from roles/www_back_end/files/html/css/fa.all.min.css rename to roles/www_base/files/html/css/fa.all.min.css diff --git a/roles/www_back_end/files/html/css/font-faces.css b/roles/www_base/files/html/css/font-faces.css similarity index 100% rename from roles/www_back_end/files/html/css/font-faces.css rename to roles/www_base/files/html/css/font-faces.css diff --git a/roles/www_back_end/files/html/css/xo-common.css b/roles/www_base/files/html/css/xo-common.css similarity index 100% rename from roles/www_back_end/files/html/css/xo-common.css rename to roles/www_base/files/html/css/xo-common.css diff --git a/roles/www_back_end/files/html/fonts/bubblegum-sans-v6-latin-regular.woff b/roles/www_base/files/html/fonts/bubblegum-sans-v6-latin-regular.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/bubblegum-sans-v6-latin-regular.woff rename to roles/www_base/files/html/fonts/bubblegum-sans-v6-latin-regular.woff diff --git a/roles/www_back_end/files/html/fonts/bubblegum-sans-v6-latin-regular.woff2 b/roles/www_base/files/html/fonts/bubblegum-sans-v6-latin-regular.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/bubblegum-sans-v6-latin-regular.woff2 rename to roles/www_base/files/html/fonts/bubblegum-sans-v6-latin-regular.woff2 diff --git a/roles/www_back_end/files/html/fonts/fa-solid-900.woff b/roles/www_base/files/html/fonts/fa-solid-900.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/fa-solid-900.woff rename to roles/www_base/files/html/fonts/fa-solid-900.woff diff --git a/roles/www_back_end/files/html/fonts/fa-solid-900.woff2 b/roles/www_base/files/html/fonts/fa-solid-900.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/fa-solid-900.woff2 rename to roles/www_base/files/html/fonts/fa-solid-900.woff2 diff --git a/roles/www_back_end/files/html/fonts/finger-paint-v7-latin-regular.woff b/roles/www_base/files/html/fonts/finger-paint-v7-latin-regular.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/finger-paint-v7-latin-regular.woff rename to roles/www_base/files/html/fonts/finger-paint-v7-latin-regular.woff diff --git a/roles/www_back_end/files/html/fonts/finger-paint-v7-latin-regular.woff2 b/roles/www_base/files/html/fonts/finger-paint-v7-latin-regular.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/finger-paint-v7-latin-regular.woff2 rename to roles/www_base/files/html/fonts/finger-paint-v7-latin-regular.woff2 diff --git a/roles/www_back_end/files/html/fonts/flavors-v6-latin-regular.woff b/roles/www_base/files/html/fonts/flavors-v6-latin-regular.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/flavors-v6-latin-regular.woff rename to roles/www_base/files/html/fonts/flavors-v6-latin-regular.woff diff --git a/roles/www_back_end/files/html/fonts/flavors-v6-latin-regular.woff2 b/roles/www_base/files/html/fonts/flavors-v6-latin-regular.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/flavors-v6-latin-regular.woff2 rename to roles/www_base/files/html/fonts/flavors-v6-latin-regular.woff2 diff --git a/roles/www_back_end/files/html/fonts/freckle-face-v6-latin-regular.woff b/roles/www_base/files/html/fonts/freckle-face-v6-latin-regular.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/freckle-face-v6-latin-regular.woff rename to roles/www_base/files/html/fonts/freckle-face-v6-latin-regular.woff diff --git a/roles/www_back_end/files/html/fonts/freckle-face-v6-latin-regular.woff2 b/roles/www_base/files/html/fonts/freckle-face-v6-latin-regular.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/freckle-face-v6-latin-regular.woff2 rename to roles/www_base/files/html/fonts/freckle-face-v6-latin-regular.woff2 diff --git a/roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.eot b/roles/www_base/files/html/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.eot rename to roles/www_base/files/html/fonts/glyphicons-halflings-regular.eot diff --git a/roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.svg b/roles/www_base/files/html/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.svg rename to roles/www_base/files/html/fonts/glyphicons-halflings-regular.svg diff --git a/roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.ttf b/roles/www_base/files/html/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.ttf rename to roles/www_base/files/html/fonts/glyphicons-halflings-regular.ttf diff --git a/roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.woff b/roles/www_base/files/html/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/glyphicons-halflings-regular.woff rename to roles/www_base/files/html/fonts/glyphicons-halflings-regular.woff diff --git a/roles/www_back_end/files/html/fonts/open-sans-v15-latin-600.woff b/roles/www_base/files/html/fonts/open-sans-v15-latin-600.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/open-sans-v15-latin-600.woff rename to roles/www_base/files/html/fonts/open-sans-v15-latin-600.woff diff --git a/roles/www_back_end/files/html/fonts/open-sans-v15-latin-600.woff2 b/roles/www_base/files/html/fonts/open-sans-v15-latin-600.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/open-sans-v15-latin-600.woff2 rename to roles/www_base/files/html/fonts/open-sans-v15-latin-600.woff2 diff --git a/roles/www_back_end/files/html/fonts/open-sans-v15-latin-700.woff b/roles/www_base/files/html/fonts/open-sans-v15-latin-700.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/open-sans-v15-latin-700.woff rename to roles/www_base/files/html/fonts/open-sans-v15-latin-700.woff diff --git a/roles/www_back_end/files/html/fonts/open-sans-v15-latin-700.woff2 b/roles/www_base/files/html/fonts/open-sans-v15-latin-700.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/open-sans-v15-latin-700.woff2 rename to roles/www_base/files/html/fonts/open-sans-v15-latin-700.woff2 diff --git a/roles/www_back_end/files/html/fonts/open-sans-v15-latin-regular.woff b/roles/www_base/files/html/fonts/open-sans-v15-latin-regular.woff similarity index 100% rename from roles/www_back_end/files/html/fonts/open-sans-v15-latin-regular.woff rename to roles/www_base/files/html/fonts/open-sans-v15-latin-regular.woff diff --git a/roles/www_back_end/files/html/fonts/open-sans-v15-latin-regular.woff2 b/roles/www_base/files/html/fonts/open-sans-v15-latin-regular.woff2 similarity index 100% rename from roles/www_back_end/files/html/fonts/open-sans-v15-latin-regular.woff2 rename to roles/www_base/files/html/fonts/open-sans-v15-latin-regular.woff2 diff --git a/roles/www_back_end/files/html/html/credits.html b/roles/www_base/files/html/html/credits.html similarity index 100% rename from roles/www_back_end/files/html/html/credits.html rename to roles/www_base/files/html/html/credits.html diff --git a/roles/www_back_end/files/html/js/Markdown.Converter.js b/roles/www_base/files/html/js/Markdown.Converter.js similarity index 100% rename from roles/www_back_end/files/html/js/Markdown.Converter.js rename to roles/www_base/files/html/js/Markdown.Converter.js diff --git a/roles/www_back_end/files/html/js/Markdown.Sanitizer.js b/roles/www_base/files/html/js/Markdown.Sanitizer.js similarity index 100% rename from roles/www_back_end/files/html/js/Markdown.Sanitizer.js rename to roles/www_base/files/html/js/Markdown.Sanitizer.js diff --git a/roles/www_back_end/files/html/js/XMLDisplay.js b/roles/www_base/files/html/js/XMLDisplay.js similarity index 100% rename from roles/www_back_end/files/html/js/XMLDisplay.js rename to roles/www_base/files/html/js/XMLDisplay.js diff --git a/roles/www_back_end/files/html/js/bootstrap.js b/roles/www_base/files/html/js/bootstrap.js similarity index 100% rename from roles/www_back_end/files/html/js/bootstrap.js rename to roles/www_base/files/html/js/bootstrap.js diff --git a/roles/www_back_end/files/html/js/bootstrap.min.js b/roles/www_base/files/html/js/bootstrap.min.js similarity index 100% rename from roles/www_back_end/files/html/js/bootstrap.min.js rename to roles/www_base/files/html/js/bootstrap.min.js diff --git a/roles/www_back_end/files/html/js/bootstrap4.min.js b/roles/www_base/files/html/js/bootstrap4.min.js similarity index 100% rename from roles/www_back_end/files/html/js/bootstrap4.min.js rename to roles/www_base/files/html/js/bootstrap4.min.js diff --git a/roles/www_back_end/files/html/js/jquery.min.js b/roles/www_base/files/html/js/jquery.min.js similarity index 100% rename from roles/www_back_end/files/html/js/jquery.min.js rename to roles/www_base/files/html/js/jquery.min.js diff --git a/roles/www_back_end/files/html/services/power_off.php b/roles/www_base/files/html/services/power_off.php similarity index 100% rename from roles/www_back_end/files/html/services/power_off.php rename to roles/www_base/files/html/services/power_off.php diff --git a/roles/www_back_end/tasks/html.yml b/roles/www_base/tasks/html.yml similarity index 100% rename from roles/www_back_end/tasks/html.yml rename to roles/www_base/tasks/html.yml diff --git a/roles/www_back_end/tasks/main.yml b/roles/www_base/tasks/main.yml similarity index 70% rename from roles/www_back_end/tasks/main.yml rename to roles/www_base/tasks/main.yml index d452084ac..893e2f392 100644 --- a/roles/www_back_end/tasks/main.yml +++ b/roles/www_base/tasks/main.yml @@ -1,5 +1,5 @@ -# Role "www_back_end" runs here, probably in 3-BASE-SERVER. -# Role "www_front_end" runs later, likely in 4-SERVER-OPTIONS. +# Role "www_base" runs here, probably in 3-BASE-SERVER. +# Role "www_options" runs later, likely in 4-SERVER-OPTIONS. # # (Don't take either name too literally!) @@ -7,7 +7,7 @@ - include_tasks: html.yml - include_tasks: php-stem.yml -- name: Create dir {{ doc_root }}/home -- if you customized var iiab_home_url e.g. in /etc/iiab/local_vars.yml, that dir is created later -- by www_front_end/tasks/main.yml +- name: Create dir {{ doc_root }}/home -- if you customized var iiab_home_url e.g. in /etc/iiab/local_vars.yml, that dir is created later -- by www_options/tasks/main.yml file: state: directory path: "{{ doc_root }}/home" # /library/www/html @@ -30,14 +30,14 @@ mode: '0755' -# RECORD www_back_end AS INSTALLED +# RECORD www_base AS INSTALLED -- name: "Set 'www_back_end_installed: True'" +- name: "Set 'www_base_installed: True'" set_fact: - www_back_end_installed: True + www_base_installed: True -- name: "Add 'www_back_end_installed: True' to {{ iiab_state_file }}" +- name: "Add 'www_base_installed: True' to {{ iiab_state_file }}" lineinfile: path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml - regexp: '^www_back_end_installed' - line: 'www_back_end_installed: True' + regexp: '^www_base_installed' + line: 'www_base_installed: True' diff --git a/roles/www_back_end/tasks/php-stem.yml b/roles/www_base/tasks/php-stem.yml similarity index 100% rename from roles/www_back_end/tasks/php-stem.yml rename to roles/www_base/tasks/php-stem.yml diff --git a/roles/www_back_end/templates/iiab-refresh-wiki-docs.sh b/roles/www_base/templates/iiab-refresh-wiki-docs.sh similarity index 100% rename from roles/www_back_end/templates/iiab-refresh-wiki-docs.sh rename to roles/www_base/templates/iiab-refresh-wiki-docs.sh diff --git a/roles/www_front_end/tasks/main.yml b/roles/www_options/tasks/main.yml similarity index 92% rename from roles/www_front_end/tasks/main.yml rename to roles/www_options/tasks/main.yml index 9add4737b..8979e3e93 100644 --- a/roles/www_front_end/tasks/main.yml +++ b/roles/www_options/tasks/main.yml @@ -1,5 +1,5 @@ -# Role "www_back_end" runs earlier, likely in 3-BASE-SERVER. -# Role "www_front_end" runs here, probably in 4-SERVER-OPTIONS. +# Role "www_base" runs earlier, likely in 3-BASE-SERVER. +# Role "www_options" runs here, probably in 4-SERVER-OPTIONS. # # (Don't take either name too literally!) @@ -99,7 +99,7 @@ when: not apache_allow_sudo -- name: Run /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (This script was installed in Stage 3 = roles/3-base-server/tasks/main.yml, which ran roles/www_back_end/tasks/main.yml) +- name: Run /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (This script was installed in Stage 3 = roles/3-base-server/tasks/main.yml, which ran roles/www_base/tasks/main.yml) command: /usr/bin/iiab-refresh-wiki-docs when: internet_available and not nodocs @@ -117,14 +117,14 @@ when: nginx_enabled | bool -# RECORD www_front_end AS INSTALLED +# RECORD www_options AS INSTALLED -- name: "Set 'www_front_end_installed: True'" +- name: "Set 'www_options_installed: True'" set_fact: - www_front_end_installed: True + www_options_installed: True -- name: "Add 'www_front_end_installed: True' to {{ iiab_state_file }}" +- name: "Add 'www_options_installed: True' to {{ iiab_state_file }}" lineinfile: path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml - regexp: '^www_front_end_installed' - line: 'www_front_end_installed: True' + regexp: '^www_options_installed' + line: 'www_options_installed: True' diff --git a/roles/www_front_end/templates/020_apache_poweroff.j2 b/roles/www_options/templates/020_apache_poweroff.j2 similarity index 100% rename from roles/www_front_end/templates/020_apache_poweroff.j2 rename to roles/www_options/templates/020_apache_poweroff.j2 diff --git a/tests/test.yml b/tests/test.yml index a79a8d2e1..12674ec24 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -73,8 +73,8 @@ - { role: usb_lib } - { role: vnstat } - { role: wordpress } - - { role: www_back_end } - - { role: www_front_end } + - { role: www_base } + - { role: www_options } - { role: yarn } #- { roles: xovis } diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 4c23da76b..caae23354 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -255,7 +255,7 @@ nginx_log_dir: /var/log/nginx nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27 +# https://github.com/iiab/iiab/blob/master/roles/www_base/tasks/main.yml#L23-L27 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index dc675e59c..cc285bb4e 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -142,7 +142,7 @@ pi_swap_file_size: 1024 nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 07e8829ad..00b6e4001 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -142,7 +142,7 @@ pi_swap_file_size: 1024 nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index b555bf659..93fe42782 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -142,7 +142,7 @@ pi_swap_file_size: 1024 nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file From 0f1e4ba5c243de4312afff5210d7c66f80a2d863 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2020 15:34:21 -0400 Subject: [PATCH 5/9] Fix explanations in default_vars & local_vars --- vars/default_vars.yml | 4 ++-- vars/local_vars_big.yml | 2 +- vars/local_vars_medium.yml | 2 +- vars/local_vars_min.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index caae23354..4dcd53977 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -251,11 +251,11 @@ nginx_interface: 0.0.0.0 nginx_conf_dir: /etc/nginx/conf.d nginx_log_dir: /var/log/nginx # -# For schools that use WordPress/Nextcloud/Moodle intensively: +# For schools that use WordPress/Nextcloud/Moodle/PBX intensively: nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_base/tasks/main.yml#L23-L27 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index cc285bb4e..63fc6d617 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -138,7 +138,7 @@ pi_swap_file_size: 1024 # roles/mysql runs here (mandatory) -# For schools that use WordPress/Nextcloud/Moodle intensively: +# For schools that use WordPress/Nextcloud/Moodle/PBX intensively: nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 00b6e4001..40c5d6378 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -138,7 +138,7 @@ pi_swap_file_size: 1024 # roles/mysql runs here (mandatory) -# For schools that use WordPress/Nextcloud/Moodle intensively: +# For schools that use WordPress/Nextcloud/Moodle/PBX intensively: nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 93fe42782..f83ce1efc 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -138,7 +138,7 @@ pi_swap_file_size: 1024 # roles/mysql runs here (mandatory) -# For schools that use WordPress/Nextcloud/Moodle intensively: +# For schools that use WordPress/Nextcloud/Moodle/PBX intensively: nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... From 801e463563050f226d568b9728eb3ebe3ab74821 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2020 15:40:06 -0400 Subject: [PATCH 6/9] Clarify php-fpm in nextcloud/tasks/install.yml --- roles/nextcloud/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/tasks/install.yml b/roles/nextcloud/tasks/install.yml index 716710c8e..69916b0d4 100644 --- a/roles/nextcloud/tasks/install.yml +++ b/roles/nextcloud/tasks/install.yml @@ -52,7 +52,7 @@ #- php-cli # NOT REQUESTED by Nextcloud #- php-common # NOT REQUESTED by Nextcloud - php-curl - - php-fpm # ALSO INSTALLED IN roles/www_base (Stage 3) for nginx_high_php_limits + - php-fpm # ALSO INSTALLED IN roles/www_options (Stage 4) for nginx_high_php_limits - php-gd - php-gmp # Optional (for SFTP storage) - php-imagick # Optional (for preview generation) From b70abcdbca575753d63e28ed76460379f6cdb477 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2020 00:31:05 -0400 Subject: [PATCH 7/9] 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?' From 089d92415bb55430c718c39dbbbf1b15c073cbad Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2020 12:40:53 -0400 Subject: [PATCH 8/9] Explain nginx_high_php_limits in default_vars & 3 local_vars files --- vars/default_vars.yml | 2 +- vars/local_vars_big.yml | 2 +- vars/local_vars_medium.yml | 2 +- vars/local_vars_min.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 4dcd53977..edab916c7 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -255,7 +255,7 @@ nginx_log_dir: /var/log/nginx nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 63fc6d617..116c65daf 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -142,7 +142,7 @@ pi_swap_file_size: 1024 nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 40c5d6378..a3d36f19f 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -142,7 +142,7 @@ pi_swap_file_size: 1024 nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index f83ce1efc..038c496f1 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -142,7 +142,7 @@ pi_swap_file_size: 1024 nginx_high_php_limits: False # WARNING: Enabling this might cause excess use of RAM/disk or other resources! # SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS... -# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L64-L68 +# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67 # ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php//fpm/php.ini # See also Apache vars {default_language, language_priority} @ top of this file From 2e68a80e34fff96c1efaf07fa931196498aaa431 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2020 12:56:48 -0400 Subject: [PATCH 9/9] is_rpi -> is_raspbian to fix merge conflict in www_base/tasks/php-stem.yml --- roles/www_base/tasks/php-stem.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/www_base/tasks/php-stem.yml b/roles/www_base/tasks/php-stem.yml index 8678e4d33..bba0059c6 100644 --- a/roles/www_base/tasks/php-stem.yml +++ b/roles/www_base/tasks/php-stem.yml @@ -11,7 +11,7 @@ group: root #mode: ???? remote_src: yes - when: is_rpi | bool + when: is_raspbian | bool - name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.x64.tar to / (x64) unarchive: