From 140932154d96bdfa7c3d967a86ed863998c64eba Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 3 Nov 2019 11:31:37 -0600 Subject: [PATCH] Add minecraft backup clean up cron job --- roles/minecraft/tasks/main.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/minecraft/tasks/main.yaml b/roles/minecraft/tasks/main.yaml index 055b5cc..d7b3aa7 100644 --- a/roles/minecraft/tasks/main.yaml +++ b/roles/minecraft/tasks/main.yaml @@ -122,6 +122,14 @@ user: root job: "{{ minecraft_opt_path }}/bin/minecraft-backup" +- name: backup clean up cron + cron: + name: minecraft backup clean up + minute: "0" + hour: "10" + user: root + job: "find {{ minecraft_opt_path }}/backup/ -type f -name '*.tar.xz' -ctime +7 -delete" + - name: set world download password htpasswd: path: "{{ minecraft_opt_path }}/etc/htpasswd"