From f6c10bce63c6534134bf42a1b47a833a756b76d0 Mon Sep 17 00:00:00 2001 From: doobry Date: Tue, 1 Oct 2024 14:14:18 +0200 Subject: [PATCH] Run occ commands after upgrade to add missing objects to database Fixes: #83 --- tasks/nextcloud/upgrade.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tasks/nextcloud/upgrade.yml b/tasks/nextcloud/upgrade.yml index df068ff..ba0fccb 100644 --- a/tasks/nextcloud/upgrade.yml +++ b/tasks/nextcloud/upgrade.yml @@ -33,6 +33,19 @@ notify: Test and restart apache2 changed_when: True +- name: "Nextcloud upgrade: run occ db:{{ item }}" + become: True + become_user: "{{ nextcloud_http_user }}" + ansible.builtin.command: > + php occ db:{{ item }} + args: + chdir: "{{ nextcloud_dl_tmp_dir }}/nextcloud" + loop: + - add-missing-columns + - add-missing-indices + - add-missing-primary-keys + changed_when: True + - name: "Nextcloud upgrade: unset maintenance mode via occ commandline" become: True become_user: "{{ nextcloud_http_user }}"