Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge updates #12

Merged
merged 7 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace: pikaviestin
name: matrix
description: Matrix roles
version: 0.0.8
version: 0.1.0
readme: README.md
repository: https://github.com/pikaviestin/ansible-matrix
license_file: LICENSE
Expand Down
10 changes: 0 additions & 10 deletions roles/extras/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

matrix_bridge_name_suffix: 'bridge'
mautrix_whatsapp_web_name: 'Mautrix-WhatsApp bridge'
mautrix_whatsapp_web_shortname: 'mx-wa'

matrix_bridge_ephemeral_events: true

python_depends:
- build-essential
Expand All @@ -16,10 +13,3 @@ python_depends:
- python3-setuptools
- python3-dev
- libpq-dev

matrix_extra_repos:
signald:
repo: 'deb https://updates.signald.org unstable main'
key:
id: 'D89FFB45291229A410A1430A659475081F665F29'
url: 'https://updates.signald.org/apt-signing-key.asc'
7 changes: 0 additions & 7 deletions roles/extras/tasks/alembic.yml

This file was deleted.

5 changes: 5 additions & 0 deletions roles/extras/tasks/appservice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
when: config.changed or install.changed
become_user: "{{ matrix_extra }}"

- name: Ensure registration file has correct permissions
ansible.builtin.file:
path: "/opt/{{ matrix_extra }}/appservice-registration.yaml"
mode: 0644

- name: Add appservice to synapse config - {{ matrix_extra }}
become_user: root
block:
Expand Down
7 changes: 7 additions & 0 deletions roles/extras/tasks/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

- name: Install latest {{ matrix_extra }} release from github releases
ansible.builtin.get_url:
url: "https://github.com/mautrix/{{ matrix_extra_software | replace('mautrix-', '') }}/releases/latest/download/{{ matrix_extra_software }}-amd64"
dest: "/opt/{{ matrix_extra }}/{{ matrix_extra }}"
mode: '755'
15 changes: 0 additions & 15 deletions roles/extras/tasks/mautrix-whatsapp.yml

This file was deleted.

13 changes: 0 additions & 13 deletions roles/extras/tasks/npm.yml

This file was deleted.

18 changes: 0 additions & 18 deletions roles/extras/tasks/repo.yml

This file was deleted.

28 changes: 0 additions & 28 deletions roles/extras/tasks/signald.yml

This file was deleted.

21 changes: 2 additions & 19 deletions roles/extras/templates/config/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
Mautrix bridge config updates last checked on 2022-08-25
Mautrix bridge config updates last checked on 2024-04-22
To add a mautrix bridge, create a var file and based on an older one and a new config file like this:

```
{% extends 'mautrix-bridge.yaml.j2' %}

{% block backfill %}
{{ super() }}
additional options for the backfill section, needs to be indentded. Omit super()
above if the required options are different from the usual.
{% endblock %}

{% block bridge %}
additional options for the bridge section, needs to be indented
{% endblock %}
Expand All @@ -20,15 +14,4 @@ additional sections here

```

Any block can be omitted if not needed

Available blocks in vars:
```
mautrix_blocks:
- public
- provisioning
- relay
- delivery_error_reports
- displayname_template
- backfill
```
Any block can be omitted if not needed.
128 changes: 0 additions & 128 deletions roles/extras/templates/config/mautrix-bridge.yaml.j2

This file was deleted.

18 changes: 18 additions & 0 deletions roles/extras/templates/config/mautrix-discord.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends 'mautrix-go.yaml.j2' %}

{% block homeserver %}
public_address: {{ matrix_external_url }}
{% endblock %}

{% block bridge %}
backfill:
forward_limits:
initial:
dm: 100
channel: 100
thread: 100
missed:
dm: 1000
channel: 1000
thread: 1000
{% endblock %}
10 changes: 1 addition & 9 deletions roles/extras/templates/config/mautrix-facebook.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
{% extends 'mautrix-bridge.yaml.j2' %}

{% block bridge %}
periodic_reconnect:
interval: 86400
temporary_disconnect_notices: false
refresh_on_reconnection_fail: true
{% endblock %}

{% extends 'mautrix-meta.yaml.j2' %}
Loading