add matrix-synapse bundle

This commit is contained in:
Franzi 2020-04-05 11:38:31 +02:00
parent 29eeffbdc3
commit 8a26def21c
Signed by: kunsi
GPG key ID: 12E3D2136B818350
8 changed files with 267 additions and 6 deletions

View file

@ -85,3 +85,6 @@ svc_systemd = {
},
},
}
if node.has_bundle('matrix-synapse'):
actions['mx-puppet-discord_generate_registration']['triggers'].add('svc_systemd:matrix-synapse:restart')

View file

@ -9,3 +9,26 @@ def mx_puppet_discord_user(metadata):
},
},
}, DEFAULTS, DONE
@metadata_processor
def add_mx_puppet_discord_to_synapse(metadata):
return {
'matrix-synapse': {
'appservice_configs': {
'/opt/mx-puppet-discord/registration.yaml',
},
},
}, DEFAULTS, DONE
@metadata_processor
def bridge_defaults(metadata):
return {
'mx-puppet-discord': {
'database': {
'user': 'mx-puppet-discord',
'password': repo.vault.password_for('{} postgresql mx-puppet-discord'.format(node.name)),
'database': 'mx-puppet-discord',
},
},
}, DEFAULTS, DONE