ansible/roles/services/tasks/mastodon_spacestate.yaml
polyfloyd 720cd70e4f
Some checks failed
Test / build (push) Failing after 54s
Move a few things over from GitHub
2025-04-29 17:50:36 +02:00

40 lines
984 B
YAML

---
- name: Install dependencies
ansible.builtin.apt:
name:
- python3-mastodon
- python3-paho-mqtt
- name: Clone source
ansible.builtin.git:
repo: https://git.bitlair.nl/bitlair/mastodon-spacestate.git
version: main
dest: /var/lib/mastodon-spacestate
accept_hostkey: yes
notify: Restart mastodon-spacestate
ignore_errors: true
- name: Install config
ansible.builtin.template:
src: mastodon-spacestate-config.py
dest: /var/lib/mastodon-spacestate/config.py
owner: root
group: root
mode: 0655
notify: Restart mastodon-spacestate
- name: Install service file
ansible.builtin.template:
src: mastodon-spacestate.service
dest: /etc/systemd/system/mastodon-spacestate.service
owner: root
group: root
mode: 0644
notify: Restart mastodon-spacestate
- name: Start mastodon-spacestate
ansible.builtin.systemd:
name: mastodon-spacestate
state: started
enabled: true
daemon_reload: true