mastodon_scheduler

ansible role mastodon_scheduler

Galaxy License

Galaxy release Ansible Lint check Yamllint GitHub Actions

Ansible role that can schedule Mastodon toots, created by a python3 script using Mastodon.py.

Here you are expected to have a pythonscript ready in a private git repository that can write Mastodon messages. This Ansible role generates an ssh key pair to clone the git repository, installs any python dependencies that are specified, and runs the script as many times as defined via systemd timer.

  • We create a user and a group, definied in the following variables:
mastodon_scheduler__user: 'mastodon'
mastodon_scheduler__group: 'mastodon'
  • define the ssh clone url and branch, tag or commit hash in the following variables:
mastodon_scheduler__private_repo: false
mastodon_scheduler__version: 'main'
  • Define the script name we should execute:
mastodon_scheduler__exec: 'schedule.py'
  • Python Requirements we may need:
mastodon_scheduler__pip_packages:
  - 'Mastodon.py'
  • Define the systemd Timer Execution time:
# the default time is every Thursday at 23:42:23
mastodon_scheduler__time: 'Thu *-*-* 23:42:23'
About

Deploy a systemd timer that will schedule Mastodon Messages for you

Install
ansible-galaxy install roles-ansible/ansible_role_mastodon_scheduler
GitHub repository
License
mit
Downloads
20
Owner
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy