From 1ee1a391fce9537b2f72bf3073a42c50d35d4ea4 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Mon, 19 Apr 2021 13:26:41 +0100 Subject: [PATCH] Fix --- roles/autoradio/templates/autoradio-backup.cron.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/autoradio/templates/autoradio-backup.cron.j2 b/roles/autoradio/templates/autoradio-backup.cron.j2 index 3f45c9d..1057201 100644 --- a/roles/autoradio/templates/autoradio-backup.cron.j2 +++ b/roles/autoradio/templates/autoradio-backup.cron.j2 @@ -6,5 +6,6 @@ # KEEP_LAST=30 INDEX={% for host in groups['all'] | sort %}{% if host == inventory_hostname %}{{ loop.index0 }}{% endif %}{% endfor %} + 32 3 * * * root [ $(expr $(date +\%-j) \% {{ groups['all'] | length }}) -eq $INDEX ] && { radioctl backup | restic-wrapper backup --quiet --stdin --stdin-filename autoradio.json ; restic-wrapper forget --quiet --keep-last $KEEP_LAST --prune ; } -- GitLab