Add cron jobs to clean cached Mastodon data, close #170

This commit is contained in:
Sam A. 2023-07-11 21:56:04 +02:00
parent 9920676155
commit 7d8b96cef0
Signed by untrusted user: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -187,3 +187,21 @@
external: true external: true
internal_network: internal_network:
internal: true 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