diff options
author | binary <me@rgoncalves.se> | 2021-03-15 20:41:58 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-03-15 20:41:58 +0100 |
commit | 6cf77357bcd32ecff44446564ece49b1ab286ece (patch) | |
tree | 9308ab179ceb0373d7893fe1c8d9065ca4e500b5 /roles/nextcloud/tasks | |
parent | 44b32f0d099d130f9e5691d049740b117334c5cb (diff) | |
download | infrastructure-6cf77357bcd32ecff44446564ece49b1ab286ece.tar.gz |
Turn some manuals quirks to automatic.
Diffstat (limited to 'roles/nextcloud/tasks')
-rw-r--r-- | roles/nextcloud/tasks/main.yml | 37 |
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 |