Skip to content
Snippets Groups Projects
Commit 67e986b2 authored by Christian Elberfeld's avatar Christian Elberfeld
Browse files

Matrix Bridge für Test

parent e097151c
No related branches found
No related tags found
No related merge requests found
---
# Einige Secrets sind auf dem Server lokal gespeichert und werden von dort gelesen
# Auslesen der Dateien vom Server, zwischengespeicert wird in der Variable gitlab_secrets
# Anschließend müssen die entsprechenden Einträge aus gitlab_secrets extrahiert werden
# Die Daten, die von Slurp gelesen werden sind Base64 codiert
# Zur Sicherheit werden Whitespace-Zeichen entfert, damit z.B. Zeilenumbrüche nicht übernommen werden
- name: get secrets from server 1
slurp: src={{ item }}
with_items:
- /srv/matterbridge/secret/irc_pass_wz
- /srv/matterbridge/secret/mattermost_pass_cwbot
- /srv/matterbridge/secret/telegram_token_cw
- /srv/matterbridge/secret/telegram_token_wz
register: matterbridge_secrets
- name: get secrets from server 2
set_fact:
irc_pass_wz: "{{ matterbridge_secrets.results | selectattr('item', 'equalto', '/srv/matterbridge/secret/irc_pass_wz') | map(attribute='content') | list | first | b64decode | regex_replace('\\s', '') }}"
mattermost_pass_cwbot: "{{ matterbridge_secrets.results | selectattr('item', 'equalto', '/srv/matterbridge/secret/mattermost_pass_cwbot') | map(attribute='content') | list | first | b64decode | regex_replace('\\s', '') }}"
telegram_token_cw: "{{ matterbridge_secrets.results | selectattr('item', 'equalto', '/srv/matterbridge/secret/telegram_token_cw') | map(attribute='content') | list | first | b64decode | regex_replace('\\s', '') }}"
telegram_token_wz: "{{ matterbridge_secrets.results | selectattr('item', 'equalto', '/srv/matterbridge/secret/telegram_token_wz') | map(attribute='content') | list | first | b64decode | regex_replace('\\s', '') }}"
# Secrets
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: /srv/matterbridge/secret/irc_pass_wz, length: -1 }
- { path: /srv/matterbridge/secret/matrix_pass_wzbot, length: -1 }
- { path: /srv/matterbridge/secret/mattermost_pass_cwbot, length: -1 }
- { path: /srv/matterbridge/secret/telegram_token_cw, length: -1 }
- { path: /srv/matterbridge/secret/telegram_token_wz, length: -1 }
# Folder Structure
......
......@@ -94,6 +94,56 @@ Token="{{ telegram_token_wz }}"
#OPTIONAL (default false)
ShowJoinPart=false
###################################################################
#matrix section
###################################################################
[matrix]
#You can configure multiple servers "[matrix.name]" or "[matrix.name2]"
#In this example we use [matrix.neo]
#REQUIRED
[matrix.warpzone]
#Server is your homeserver (eg https://matrix.org)
#REQUIRED
Server="{{ matrix.public_url }}"
#login/pass of your bot.
#Use a dedicated user for this and not your own!
#Messages sent from this user will not be relayed to avoid loops.
#REQUIRED
Login="wzbot"
Password="{{ matrix_pass_wzbot }}"
#Whether to send the homeserver suffix. eg ":matrix.org" in @username:matrix.org
#to other bridges, or only send "username".(true only sends username)
#OPTIONAL (default false)
NoHomeServerSuffix=false
## RELOADABLE SETTINGS
## Settings below can be reloaded by editing the file
#Whether to prefix messages from other bridges to matrix with the sender's nick.
#Useful if username overrides for incoming webhooks isn't enabled on the
#matrix server. If you set PrefixMessagesWithNick to true, each message
#from bridge to matrix will by default be prefixed by the RemoteNickFormat setting. i
#OPTIONAL (default false)
PrefixMessagesWithNick=true
#RemoteNickFormat defines how remote users appear on this bridge
#See [general] config section for default options
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
#Enable to show users joins/parts from other bridges
#Currently works for messages from the following bridges: irc, mattermost, slack, discord
#OPTIONAL (default false)
ShowJoinPart=false
#StripNick only allows alphanumerical nicks. See https://github.com/42wim/matterbridge/issues/285
#It will strip other characters from the nick
#OPTIONAL (default false)
StripNick=false
###################################################################
#General configuration
......@@ -127,42 +177,11 @@ name="gateway1"
##OPTIONAL (default false)
enable=true
#[[gateway.in]] specifies the account and channels we will receive messages from.
#[[gateway.out]] specifies the account and channels we will sent messages to.
#account specified above
#REQUIRED
#account="irc.freenode"
#channel to connect on that account
#How to specify them for the different bridges:
#
#irc - #channel (# is required)
#mattermost - channel (the channel name as seen in the URL, not the displayname)
#gitter - username/room
#xmpp - channel
#slack - channel (the channel name as seen in the URL, not the displayname)
#discord - channel (without the #)
# - ID:123456789 (where 123456789 is the channel ID)
# (https://github.com/42wim/matterbridge/issues/57)
#telegram - chatid (a large negative number, eg -123456789)
# see (https://www.linkedin.com/pulse/telegram-bots-beginners-marco-frau)
#hipchat - id_channel (see https://www.hipchat.com/account/xmpp for the correct channel)
#rocketchat - #channel (# is required)
#matrix - room internal ID (looks like !QJFqjsGJwmQzbuBfff:matrix.org)
#REQUIRED
#channel="#somechannel"
[[gateway.inout]]
## Der IRC Channel der Wapzone
account="irc.freenode"
channel="#warpzone"
#[[gateway.inout]]
## Raum Town-Squre auf dem Warpzone Mattermost Server
#account="mattermost.warpzone"
#channel="town-square"
[[gateway.inout]]
## Telegramm Gruppe @warpzone (Spamfreie Warpzone Gruppe)
## 8.8.2017 von void deaaktiviert das das Spammen im Telegram Leute genervt hat
......@@ -174,3 +193,7 @@ enable=true
account="telegram.bot"
channel="-272574265"
[[gateway.inout]]
## Raum auf dem Warpzone Matrix Server
account="matrix.warpzone"
channel="#bridge-test:matrix.warpzone.ms"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment