From 49cb7aadbe6552399dc78171d5707e9405d9b7e0 Mon Sep 17 00:00:00 2001 From: waffles Date: Thu, 26 Jan 2023 19:42:47 -0800 Subject: [PATCH] Create wrapper script for tootctl that shells out to docker --- roles/mastodon/files/tootctl | 4 ++++ roles/mastodon/tasks/maintenance.yml | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 roles/mastodon/files/tootctl diff --git a/roles/mastodon/files/tootctl b/roles/mastodon/files/tootctl new file mode 100644 index 0000000..5fb643f --- /dev/null +++ b/roles/mastodon/files/tootctl @@ -0,0 +1,4 @@ +#!/bin/bash + +# Wrap around a docker command to invoke `tootctl` +docker exec -it $(docker ps -f name=web -q | head -n1) bin/tootctl $* diff --git a/roles/mastodon/tasks/maintenance.yml b/roles/mastodon/tasks/maintenance.yml index 7d71642..607e60a 100644 --- a/roles/mastodon/tasks/maintenance.yml +++ b/roles/mastodon/tasks/maintenance.yml @@ -39,3 +39,17 @@ tags: - install when: pull_images.changed + +- name: Install tootctl wrapper script + copy: + src: tootctl + dest: /usr/local/bin/tootctl + tags: + - install + +- name: Set permissions on tootctl + file: + path: /usr/local/bin/tootctl + mode: '0755' + tags: + - install