diff options
-rw-r--r-- | roles/nextcloud/tasks/main.yml | 37 | ||||
-rw-r--r-- | roles/nextcloud/templates/var-www-nextcloud-config-custom.config.php.j2 | 4 |
2 files changed, 40 insertions, 1 deletions
diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 6d1230d..ab10770 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -5,7 +5,17 @@ --- - name: install nextcloud - package: name=nextcloud state=present + package: + name: nextcloud + state: present + +- name: install nextcloud extra dependencies + package: + name: "{{ item }}" + state: present + loop: + - "php-pgsql-7.3.27" + - "php-pdo_pgsql-7.3.27" - name: generate nextcloud httpd configuration template: @@ -35,6 +45,15 @@ - [ "allow_url_fopen", "On" ] - [ "upload_max_filesize", "100M" ] - [ "post_max_size", "100M" ] + - [ "memory_limit", "1024M" ] + +- name: generate nextcloud custom config + template: + src: var-www-nextcloud-config-custom.config.php.j2 + dest: /var/www/nextcloud/config/custom.config.php.j2 + owner: "www" + group: "www" + mode: "0644" - name: copy configuration for domain name and tls in chroot shell: | @@ -42,6 +61,22 @@ install -m 444 -o root -g bin /etc/resolv.conf /var/www/etc install -m 444 -o root -g bin /etc/ssl/cert.pem /etc/ssl/openssl.cnf /var/www/etc/ssl/ +- name: enable cron job for nextcloud indexing and housekeeping + cron: + name: "nextcloud indexing" + minute: "*/5" + job: "php -f /var/www/nextcloud/cron.php" + +- name: ensure directories are chow to www + file: + path: "/var/www/nextcloud/{{ item }}" + owner: "www" + group: "www" + recurse: true + loop: + - "apps" + - "updater" + - name: ensure php-fpm is restarted and enabled service: name: php73_fpm diff --git a/roles/nextcloud/templates/var-www-nextcloud-config-custom.config.php.j2 b/roles/nextcloud/templates/var-www-nextcloud-config-custom.config.php.j2 new file mode 100644 index 0000000..15df079 --- /dev/null +++ b/roles/nextcloud/templates/var-www-nextcloud-config-custom.config.php.j2 @@ -0,0 +1,4 @@ +<?php +$CONFIG = array ( + 'datadirectory' => ((php_sapi_name() == 'cli') ? '/var/www' : '') . '/nextcloud/data', +); |