From a20c7b188d04c9d0c5d30b11baa22fadb91af3d3 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer Date: Thu, 6 Jul 2023 11:37:56 +0200 Subject: [PATCH] =?UTF-8?q?L=C3=B6sche=20Backups=20nach=20sieben=20Tagen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks/main.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/main.yaml b/tasks/main.yaml index 0903783..ccdafa2 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -39,6 +39,15 @@ enabled: true state: started +- name: Ensure old backups will get deleted + ansible.builtin.cron: + name: gitea backup cleanup + minute: "0" + hour: "8" + user: root + job: "find /var/backups/gitea-* -mtime +7 -type f -delete" + cron_file: gitea-backup-cleanup + - name: Check if environment.env will get changed ansible.builtin.template: src: environment.env.j2