aboutsummaryrefslogtreecommitdiffstats
path: root/roles/nextcloud/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nextcloud/tasks')
-rw-r--r--roles/nextcloud/tasks/main.yml37
1 files changed, 36 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
remember that computers suck.