🔥: better Mastodon purge
This commit is contained in:
@@ -63,12 +63,9 @@
|
|||||||
- name: Put template scripts
|
- name: Put template scripts
|
||||||
remote_user: mastodon
|
remote_user: mastodon
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item }}.j2"
|
src: remove_media.sh.j2
|
||||||
dest: "{{ mastodon_home }}/bin/{{ item }}"
|
dest: "{{ mastodon_home }}/bin/remove_media.sh"
|
||||||
mode: "0o750"
|
mode: "0o750"
|
||||||
loop:
|
|
||||||
- remove_media.sh
|
|
||||||
- remove_preview_cards.sh
|
|
||||||
|
|
||||||
- name: Install services
|
- name: Install services
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@@ -2,3 +2,5 @@
|
|||||||
cd {{ mastodon_home }}/live
|
cd {{ mastodon_home }}/live
|
||||||
PATH={{ mastodon_home }}/bin:{{ mastodon_home }}/.local/bin:{{ mastodon_home }}/.rbenv/plugins/ruby-build/bin:{{ mastodon_home }}/.rbenv/shims:{{ mastodon_home }}/.rbenv/bin:/usr/bin:/bin
|
PATH={{ mastodon_home }}/bin:{{ mastodon_home }}/.local/bin:{{ mastodon_home }}/.rbenv/plugins/ruby-build/bin:{{ mastodon_home }}/.rbenv/shims:{{ mastodon_home }}/.rbenv/bin:/usr/bin:/bin
|
||||||
RAILS_ENV=production bin/tootctl media remove
|
RAILS_ENV=production bin/tootctl media remove
|
||||||
|
RAILS_ENV=production bin/tootctl media remove --days=45 --prune-profiles
|
||||||
|
RAILS_ENV=production bin/tootctl preview_cards remove
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cd {{ mastodon_home }}/live
|
|
||||||
PATH={{ mastodon_home }}/bin:{{ mastodon_home }}/.local/bin:{{ mastodon_home }}/.rbenv/plugins/ruby-build/bin:{{ mastodon_home }}/.rbenv/shims:{{ mastodon_home }}/.rbenv/bin:/usr/bin:/bin
|
|
||||||
RAILS_ENV=production bin/tootctl preview_cards remove
|
|
@@ -7,11 +7,3 @@
|
|||||||
minute: "0"
|
minute: "0"
|
||||||
hour: "2"
|
hour: "2"
|
||||||
job: "{{ mastodon_home }}/bin/remove_media.sh"
|
job: "{{ mastodon_home }}/bin/remove_media.sh"
|
||||||
|
|
||||||
- name: Cron for preview_cards tootctl
|
|
||||||
ansible.builtin.cron:
|
|
||||||
user: mastodon
|
|
||||||
name: Mastodon tootctl preview
|
|
||||||
minute: "30"
|
|
||||||
hour: "2"
|
|
||||||
job: "{{ mastodon_home }}/bin/remove_preview_cards.sh"
|
|
||||||
|
Reference in New Issue
Block a user