diff --git a/roles/docker/tasks/services/mastodon.yml b/roles/docker/tasks/services/mastodon.yml index 654a32b..62aed53 100644 --- a/roles/docker/tasks/services/mastodon.yml +++ b/roles/docker/tasks/services/mastodon.yml @@ -187,3 +187,21 @@ external: true internal_network: internal: true + +- name: Configure cron job to remove old Mastodon media daily + cron: + name: Clean Mastodon media data older than a week + cron_file: ansible_mastodon_clean_media + job: docker exec mastodon_web_1 tootctl media remove --days 7 + special_time: daily + user: root + state: present + +- name: Configure cron job to remove old Mastodon preview cards daily + cron: + name: Clean Mastodon media data older than a week + cron_file: ansible_mastodon_clean_preview_cards + job: docker exec mastodon_web_1 tootctl media remove --days 14 + special_time: daily + user: root + state: present