Fix up tmodloader cron
This commit is contained in:
parent
725687e05e
commit
43ccced1c5
@ -10,12 +10,13 @@
|
|||||||
vars:
|
vars:
|
||||||
backup_dirs:
|
backup_dirs:
|
||||||
- "/data/tmodloader/generic/data/tModLoader/Worlds"
|
- "/data/tmodloader/generic/data/tModLoader/Worlds"
|
||||||
|
backup_dest: "/data/tmodloader/generic/backups"
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
user: root
|
user: root
|
||||||
name: terraria-generic-backup
|
name: terraria-generic-backup
|
||||||
state: present
|
state: present
|
||||||
minute: "*/15"
|
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 ]
|
tags: [ docker, tmodloader, generic, cron, backup, tar ]
|
||||||
- name: assure backups dir tmodloader - generic
|
- name: assure backups dir tmodloader - generic
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user