From c7708ca82b791f97c768a795acbd8b855fc37517 Mon Sep 17 00:00:00 2001 From: Sergej Hoffmann <97111299+SevenWaysDP@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:47:25 +0200 Subject: [PATCH] BC-7881 - recreate tldraw migration job if necessary (#5229) Co-authored-by: Phillip Wirth --- .../roles/schulcloud-server-core/tasks/main.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ansible/roles/schulcloud-server-core/tasks/main.yml b/ansible/roles/schulcloud-server-core/tasks/main.yml index ffb6e8ad0da..10f7c353ab4 100644 --- a/ansible/roles/schulcloud-server-core/tasks/main.yml +++ b/ansible/roles/schulcloud-server-core/tasks/main.yml @@ -175,12 +175,25 @@ tags: - ingress - - name: tldaraw migration Job + + - name: remove old tldraw migration Job + kubernetes.core.k8s: + kubeconfig: ~/.kube/config + namespace: "{{ NAMESPACE }}" + api_version: batch/v1 + kind: Job + name: tldraw-migration-job + state: absent + wait: yes + tags: + - job + + - name: tldraw migration Job kubernetes.core.k8s: kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: tldraw-migration-job.yml.j2 - state: "{{ 'present' if WITH_TLDRAW2 else 'absent'}}" + when: WITH_TLDRAW2 is defined and WITH_TLDRAW2|bool tags: - job