mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
74 lines
2.7 KiB
YAML
74 lines
2.7 KiB
YAML
# Role "www_back_end" runs here, probably in 3-BASE-SERVER.
|
|
# Role "www_front_end" runs later, likely in 4-SERVER-OPTIONS.
|
|
#
|
|
# (Don't take either name too literally!)
|
|
|
|
|
|
- include_tasks: html.yml
|
|
|
|
|
|
- include_tasks: php-stem.yml
|
|
|
|
- name: Install php-fpm (FastCGI Process Manager) if nextcloud_install or pbx_install
|
|
package:
|
|
name: php-fpm
|
|
when: nextcloud_install or pbx_install
|
|
|
|
# COMPARE apache_allow_sudo @ roles/www_front_end/tasks/main.yml
|
|
|
|
# For schools that use WordPress/Nextcloud/Moodle intensively.
|
|
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
|
- name: Enact high limits in /etc/php/{{ php_version }}/fpm/php.ini if using WordPress/Nextcloud/Moodle intensively
|
|
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 = 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' }
|
|
when: nginx_high_php_limits | bool
|
|
|
|
- name: Restart 'php{{ php_version }}-fpm' systemd services
|
|
systemd:
|
|
name: "php{{ php_version }}-fpm"
|
|
state: restarted
|
|
|
|
|
|
- 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
|
|
file:
|
|
state: directory
|
|
path: "{{ doc_root }}/home" # /library/www/html
|
|
owner: "{{ apache_user }}"
|
|
group: "{{ apache_user }}"
|
|
# mode: '0755'
|
|
|
|
- name: Create dir {{ doc_root }}/info for http://box/info offline docs
|
|
file:
|
|
state: directory
|
|
path: "{{ doc_root }}/info" # /library/www/html
|
|
owner: "{{ apache_user }}"
|
|
group: "{{ apache_user }}"
|
|
# mode: '0755'
|
|
|
|
- name: Install /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (Script can be run manually and/or at the end of Stage 4 = roles/4-server-options/tasks/main.yml)
|
|
template:
|
|
src: iiab-refresh-wiki-docs.sh
|
|
dest: /usr/bin/iiab-refresh-wiki-docs
|
|
mode: '0755'
|
|
|
|
|
|
# RECORD www_back_end AS INSTALLED
|
|
|
|
- name: "Set 'www_back_end_installed: True'"
|
|
set_fact:
|
|
www_back_end_installed: True
|
|
|
|
- name: "Add 'www_back_end_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'
|