services: Add spacestate->Mastodon service
This commit is contained in:
parent
75b1fd6946
commit
37c374d0c4
6 changed files with 78 additions and 0 deletions
|
@ -10,3 +10,6 @@
|
|||
|
||||
- tags: services_spacestated
|
||||
import_tasks: spacestated.yaml
|
||||
|
||||
- tags: services_mastodon_spacestate
|
||||
import_tasks: mastodon_spacestate.yaml
|
||||
|
|
39
roles/services/tasks/mastodon_spacestate.yaml
Normal file
39
roles/services/tasks/mastodon_spacestate.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name:
|
||||
- python3-mastodon
|
||||
- python3-paho-mqtt
|
||||
|
||||
- name: Clone source
|
||||
git:
|
||||
repo: https://github.com/bitlair/mastodon-spacestate.git
|
||||
version: main
|
||||
dest: /var/lib/mastodon-spacestate
|
||||
accept_hostkey: yes
|
||||
notify: restart mastodon-spacestate
|
||||
|
||||
- name: Install config
|
||||
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
|
||||
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
|
||||
systemd:
|
||||
name: mastodon-spacestate
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: true
|
|
@ -19,6 +19,7 @@
|
|||
version: main
|
||||
dest: /var/lib/spacestated/spacestated
|
||||
accept_hostkey: yes
|
||||
notify: restart spacestated
|
||||
|
||||
- name: Install service file
|
||||
template:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue