Browse Source

roles/nextcloud: bumps to .5 and php 7.4

Plus some php cache tunings
python3
Zolfa 4 years ago
parent
commit
849e99d150
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
3 changed files with 41 additions and 27 deletions
  1. +1
    -1
      roles/nextcloud/defaults/main.yaml
  2. +39
    -25
      roles/nextcloud/tasks/main.yaml
  3. +1
    -1
      roles/nextcloud/templates/nextcloud.conf.j2

+ 1
- 1
roles/nextcloud/defaults/main.yaml View File

@ -1,6 +1,6 @@
---
host_fqdn: '{{ ansible_hostname }}.dmz.{{ domain }}'
nextcloud_version: '18.0.4'
nextcloud_version: '18.0.5'
nextcloud_nginx_fqdn: '{{ ansible_hostname }}.{{ domain }}'
nextcloud_nginx_alternate_fqdns: []
ldap_server: 'ldap1.dmz.{{ domain }}'


+ 39
- 25
roles/nextcloud/tasks/main.yaml View File

@ -17,21 +17,23 @@
- name: 'install php'
import_role: name='service'
vars:
service_name: 'php7.3-fpm'
service_name: 'php7.4-fpm'
service_packages:
- 'php-fpm'
- 'php-common'
- 'php-xml'
- 'php-gd'
- 'php-json'
- 'php-mbstring'
- 'php-zip'
- 'php-pgsql'
- 'php-ldap'
- 'php-curl'
- 'php-intl'
- 'php-bz2'
#- 'php7.3.-imagick'
- 'php7.4-fpm'
- 'php7.4-common'
- 'php7.4-xml'
- 'php7.4-gd'
- 'php7.4-json'
- 'php7.4-mbstring'
- 'php7.4-zip'
- 'php7.4-pgsql'
- 'php7.4-ldap'
- 'php7.4-curl'
- 'php7.4-intl'
- 'php7.4-bz2'
- 'php7.4-redis'
- 'php7.4-apcu'
- 'php-imagick'
- block:
- name: 'create nextcloud DB'
@ -46,25 +48,37 @@
become_method: 'su'
become_user: 'postgres'
- name: 'configure php-fpm'
lineinfile:
path: '/etc/php/7.3/fpm/pool.d/www.conf'
path: '/etc/php/7.4/fpm/pool.d/www.conf'
line: '{{ item.line }}'
regexp: '{{ item.regexp }}'
loop:
- { line: 'env[PATH] = /usr/local/bin:/usr/bin:/bin', regexp: '^env\[PATH\] = ' }
- { line: 'env[TEMP] = /tmp', regexp: '^env\[TEMP\] = ' }
- { line: 'env[TMP] = /tmp', regexp: '^env\[TMP\] = ' }
- { line: 'env[TMPDIR] = /tmp', regexp: '^env\[TMPDIR\] = ' }
notify: 'restart php7.3-fpm'
- { line: 'env[PATH] = /usr/local/bin:/usr/bin:/bin', regexp: '^;?env\[PATH\] = ' }
- { line: 'env[TEMP] = /tmp', regexp: '^;?env\[TEMP\] = ' }
- { line: 'env[TMP] = /tmp', regexp: '^;?env\[TMP\] = ' }
- { line: 'env[TMPDIR] = /tmp', regexp: '^;?env\[TMPDIR\] = ' }
- { line: 'pm = dynamic', regexp: '^;?pm = ' }
- { line: 'pm.max_children = 120', regexp: '^;?pm.max_children = ' }
- { line: 'pm.start_servers = 12', regexp: '^;?pm.start server = ' }
- { line: 'pm.min_spare_servers = 6', regexp: '^;?pm.min_spare_servers = ' }
- { line: 'pm.max_spare_servers = 18', regexp: '^;?pm.max_spare_servers = ' }
notify: 'restart php7.4-fpm'
- name: 'configure php.ini'
lineinfile:
path: '/etc/php/7.3/fpm/php.ini'
line: 'memory_limit = 512M'
regexp: '^memory_limit ='
notify: 'restart php7.3-fpm'
path: '/etc/php/7.4/fpm/php.ini'
line: '{{ item.line }}'
regexp: '{{ item.regexp }}'
loop:
- { line: 'memory_limit = 512M', regexp: '^memory_limit =' }
- { line: 'opcache.enable=1', regexp: '^[;]?opcache_enable=' }
- { line: 'opcache.interned_strings_buffer=8', regexp: '^;?opcache.interned_strings_buffer=' }
- { line: 'opcache.max_accelerated_files=10000', regexp: '^;?opcache.max_accelerated_files=' }
- { line: 'opcache.memory_consumption=128', regexp: '^;?opcache.memory_consumption=' }
- { line: 'opcache.save_comments=1', regexp: '^;?opcache.save_comments=' }
- { line: 'opcache.revalidate_freq=1', regexp: '^;?opcache.revalidate_freq=' }
notify: 'restart php7.4-fpm'
- name: 'download nextcloud'
get_url:


+ 1
- 1
roles/nextcloud/templates/nextcloud.conf.j2 View File

@ -57,7 +57,7 @@ location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|u
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}


Loading…
Cancel
Save