feat: add remove media and preview cards to mastodon

This commit is contained in:
VC
2024-07-05 11:53:29 +02:00
parent a619ca74dd
commit 7af0cd8507
7 changed files with 31 additions and 5 deletions

View File

@@ -29,6 +29,23 @@
args:
chdir: "{{ mastodon_home }}/live"
- name: create bin dir
remote_user: mastodon
file:
path: "{{ mastodon_home }}/bin"
state: directory
mode: '0750'
- name: template scripts
remote_user: mastodon
template:
src: "{{ item }}.j2"
dest: "{{ mastodon_home }}/bin/{{ item }}"
mode: '0750'
loop:
- remove_media.sh
- remove_preview_cards.sh
- name: install services
template:
src: "{{ item }}.j2"

View File

@@ -20,7 +20,7 @@
remote_user: mastodon
lineinfile:
path: "{{ mastodon_home }}/.bashrc"
line: "eval \"$(~/.rbenv/bin/rbenv init - bash)\""
line: "eval \"$({{ mastodon_home }}/.rbenv/bin/rbenv init - bash)\""
- name: install ruby version
remote_user: mastodon

View File

@@ -0,0 +1,4 @@
#!/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 media remove

View File

@@ -0,0 +1,4 @@
#!/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

View File

@@ -1,7 +1,5 @@
---
mastodon_home: "/srv/mastodon"
mastodon_version: "4.0.2"
mastodon_nodejs_key_url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key"