From 43ccced1c55a3748cd0da84711d993c53436750a Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Mon, 6 Jan 2025 02:56:20 -0600 Subject: [PATCH] Fix up tmodloader cron --- playbooks/tasks/game/tmodloader-generic.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbooks/tasks/game/tmodloader-generic.yml b/playbooks/tasks/game/tmodloader-generic.yml index 30302a2..56d73f4 100644 --- a/playbooks/tasks/game/tmodloader-generic.yml +++ b/playbooks/tasks/game/tmodloader-generic.yml @@ -10,12 +10,13 @@ vars: backup_dirs: - "/data/tmodloader/generic/data/tModLoader/Worlds" + backup_dest: "/data/tmodloader/generic/backups" ansible.builtin.cron: user: root name: terraria-generic-backup state: present minute: "*/15" - job: "tar czvf \"/data/tmodloader/generic/backups/world-$(date +%Y-%m-%d-%H%M).tgz\" {{ backup_dirs | join(' ') }}" + job: "tar czvf \"{{ backup_dest }}/world-$(date +\\%Y-\\%m-\\%d-\\%H\\%M).tgz\" {{ backup_dirs | join(' ') }} && find {{ backup_dest }}/ -type f -iname \\*.tgz -mtime +1 -print -delete" tags: [ docker, tmodloader, generic, cron, backup, tar ] - name: assure backups dir tmodloader - generic ansible.builtin.file: