From 725466718673941117e5a393c757e78f53899f3e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 1 Sep 2025 13:06:44 +0200 Subject: [PATCH] Nextcloud: make app:update more robust by retrying once with retries/until (fixes transient migration errors) See: https://chatgpt.com/share/68b57e29-4420-800f-b326-b34d09fa64b5 --- roles/web-app-nextcloud/tasks/02_upgrade.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/web-app-nextcloud/tasks/02_upgrade.yml b/roles/web-app-nextcloud/tasks/02_upgrade.yml index 3d70013f..4fd26259 100644 --- a/roles/web-app-nextcloud/tasks/02_upgrade.yml +++ b/roles/web-app-nextcloud/tasks/02_upgrade.yml @@ -8,10 +8,13 @@ register: occ_repair changed_when: "'No repairs needed' not in occ_repair.stdout" -- name: Nextcloud | App update +- name: Nextcloud | App update (retry once) command: "{{ NEXTCLOUD_DOCKER_EXEC_OCC }} app:update --all" register: occ_app_update changed_when: "'No apps found for update' not in occ_app_update.stdout" + retries: 2 + delay: 3 + until: occ_app_update.rc == 0 - name: Nextcloud | Add missing columns command: "{{ NEXTCLOUD_DOCKER_EXEC_OCC }} db:add-missing-columns"