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: