services: Add spacestate->Mastodon service
This commit is contained in:
parent
75b1fd6946
commit
37c374d0c4
6 changed files with 78 additions and 0 deletions
14
roles/services/templates/mastodon-spacestate-config.py
Normal file
14
roles/services/templates/mastodon-spacestate-config.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
mqtt_server = 'mqtt.bitlair.nl'
|
||||
mqtt_port = 1883
|
||||
|
||||
spacestate_topic = 'bitlair/state'
|
||||
open_string = 'open'
|
||||
closed_string = 'closed'
|
||||
|
||||
spacestate_profile_key = 'Spacestate'
|
||||
open_profile_field = 'Open! @ {}'
|
||||
closed_profile_field = 'Closed @ {}'
|
||||
|
||||
profile_fields = [('Website', 'https://bitlair.nl/')]
|
||||
access_token = '{{ mastodon_spacestate_access_token }}'
|
||||
homeserver = 'https://hsnl.social'
|
15
roles/services/templates/mastodon-spacestate.service
Normal file
15
roles/services/templates/mastodon-spacestate.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Managed by Ansible
|
||||
|
||||
[Unit]
|
||||
Description=Bitlair Spacestate propagation to Mastodon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
ExecStart=/var/lib/mastodon-spacestate/mastodon-spacestate.py
|
||||
DynamicUser=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue