Compare commits
35 Commits
2d569b6ce3
...
ae045e78ee
Author | SHA1 | Date | |
---|---|---|---|
ae045e78ee
|
|||
69ed032649
|
|||
659ef7f244
|
|||
f8bb6f5f27
|
|||
ac9de51bff
|
|||
dbd9ff2e82
|
|||
6f1c63664d
|
|||
74a9c73ccd
|
|||
00248abbfa
|
|||
a4b0c12ab1
|
|||
a7b0b4fe11
|
|||
a961f10f7b
|
|||
8d60aff79d
|
|||
b611050f80
|
|||
cd0f17ae8f
|
|||
d45df4a7bb
|
|||
d591300e5a
|
|||
f57988fcd0
|
|||
0641698968
|
|||
985ab9b795
|
|||
38d973d978
|
|||
eaa3297fef
|
|||
d4145435e6
|
|||
de80e87746
|
|||
20e5a1975e
|
|||
043161a2b0
|
|||
fe3039eb05
|
|||
30841d7ace
|
|||
ba065c88e7
|
|||
4057aca3e5
|
|||
a53f20419f
|
|||
7be13cd71e
|
|||
424f5b0acf
|
|||
3a8ecadc9e
|
|||
5ae1b2b666
|
@ -145,6 +145,20 @@ The bot can intercept the report API endpoint of the client-server API, which re
|
||||
matrix_bot_draupnir_config_web_abuseReporting: true
|
||||
```
|
||||
|
||||
### Enabling synapse-http-antispam support
|
||||
|
||||
Certain protections in Draupnir require the [synapse-http-antispam](https://github.com/maunium/synapse-http-antispam) module and a Synapse homeserver plus homeserver admin status to function. This module can be enabled in the playbook via setting `matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled` to `true` and making sure that Draupnir admin API access is enabled.
|
||||
|
||||
```yaml
|
||||
# Enables the integration between Draupnir and synapse-http-antispam module.
|
||||
matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled: true
|
||||
|
||||
# Enables draupnir to access Synapse admin APIs. This is required for the module functionality to take full effect.
|
||||
matrix_bot_draupnir_admin_api_enabled: true
|
||||
```
|
||||
|
||||
These protections need to be manually activated and consulting the [enabling protections](#enabling-built-in-protections) guide can be helpful or consulting upstream documentation.
|
||||
|
||||
<!--
|
||||
NOTE: this is unsupported by the playbook due to the admin API being inaccessible from containers currently.
|
||||
|
||||
|
@ -103,7 +103,6 @@ Unless indicated otherwise, the following endpoints are reachable on your `matri
|
||||
| github oauth | `/hookshot/webhooks/oauth` | `matrix_hookshot_github_oauth_endpoint` | GitHub "Callback URL" |
|
||||
| jira oauth | `/hookshot/webhooks/jira/oauth` | `matrix_hookshot_jira_oauth_endpoint` | Jira OAuth |
|
||||
| figma endpoint | `/hookshot/webhooks/figma/webhook` | `matrix_hookshot_figma_endpoint` | Figma |
|
||||
| provisioning | `/hookshot/v1/` | `matrix_hookshot_provisioning_endpoint` | Dimension [provisioning](#provisioning-api) |
|
||||
| appservice | `/hookshot/_matrix/app/` | `matrix_hookshot_appservice_endpoint` | Matrix server |
|
||||
| widgets | `/hookshot/widgetapi/` | `matrix_hookshot_widgets_endpoint` | Widgets |
|
||||
|
||||
@ -132,10 +131,6 @@ aux_file_definitions:
|
||||
|
||||
For more information, see the documentation in the [default configuration of the aux role](https://github.com/mother-of-all-self-hosting/ansible-role-aux/blob/main/defaults/main.yml).
|
||||
|
||||
### Provisioning API
|
||||
|
||||
The provisioning API will be enabled automatically if you set `matrix_dimension_enabled: true` and provided a `matrix_hookshot_provisioning_secret`, unless you override it either way. To use hookshot with Dimension, you will need to enter as "Provisioning URL": `http://matrix-hookshot:9002`, which is made up of the variables `matrix_hookshot_container_url` and `matrix_hookshot_provisioning_port`.
|
||||
|
||||
### Collision with matrix-appservice-webhooks
|
||||
|
||||
If you are also running [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md), it reserves its namespace by the default setting `matrix_appservice_webhooks_user_prefix: '_webhook_'`. You should take care if you modify its or hookshot's prefix that they do not collide with each other's namespace (default `matrix_hookshot_generic_userIdPrefix: '_webhooks_'`).
|
||||
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
The playbook can install and configure [synapse-simple-antispam](https://github.com/t2bot/synapse-simple-antispam) for you.
|
||||
|
||||
It lets you fight invite-spam by automatically blocking invitiations from a list of servers specified by you (blacklisting).
|
||||
It lets you fight invite-spam by automatically blocking invitations from a list of servers specified by you (blacklisting).
|
||||
|
||||
See the project's [documentation](https://github.com/t2bot/synapse-simple-antispam/blob/master/README.md) to learn what it does and why it might be useful to you.
|
||||
|
||||
|
@ -2317,7 +2317,6 @@ matrix_hookshot_container_http_host_bind_ports_defaultmapping:
|
||||
- "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_appservice_port }}:{{ matrix_hookshot_appservice_port }}"
|
||||
- "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_metrics_port }}:{{ matrix_hookshot_metrics_port }}"
|
||||
- "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_webhook_port }}:{{ matrix_hookshot_webhook_port }}"
|
||||
- "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_provisioning_port }}:{{ matrix_hookshot_provisioning_port }}"
|
||||
|
||||
matrix_hookshot_container_http_host_bind_ports: "{{ matrix_hookshot_container_http_host_bind_ports_defaultmapping if matrix_playbook_service_host_bind_interface_prefix else [] }}"
|
||||
|
||||
@ -2326,8 +2325,6 @@ matrix_hookshot_container_labels_traefik_docker_network: "{{ matrix_playbook_rev
|
||||
matrix_hookshot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
|
||||
matrix_hookshot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
|
||||
|
||||
matrix_hookshot_provisioning_enabled: "{{ matrix_hookshot_provisioning_secret and matrix_dimension_enabled }}"
|
||||
|
||||
matrix_hookshot_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
|
||||
|
||||
matrix_hookshot_metrics_proxying_enabled: "{{ matrix_hookshot_metrics_enabled and matrix_metrics_exposure_enabled }}"
|
||||
@ -3202,6 +3199,9 @@ matrix_bot_draupnir_container_labels_traefik_docker_network: "{{ matrix_playbook
|
||||
matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
|
||||
matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
|
||||
|
||||
#The salt is size restricted here as a maximum salt size of 16 characters exists due to the functions used.
|
||||
matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'draupnir.httpmod', rounds=655555) | to_uuid }}" # noqa var-naming
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# /matrix-bot-draupnir
|
||||
@ -4835,6 +4835,8 @@ matrix_synapse_container_additional_networks_auto: |
|
||||
([exim_relay_container_network] if (exim_relay_enabled and matrix_synapse_email_enabled and matrix_synapse_email_smtp_host == exim_relay_identifier and matrix_synapse_container_network != exim_relay_container_network) else [])
|
||||
+
|
||||
([matrix_ma1sd_container_network] if (matrix_ma1sd_enabled and matrix_synapse_account_threepid_delegates_msisdn == matrix_synapse_account_threepid_delegates_msisdn_mas1sd_url and matrix_synapse_container_network != matrix_ma1sd_container_network) else [])
|
||||
+
|
||||
([matrix_bot_draupnir_container_network] if (matrix_synapse_ext_synapse_http_antispam_enabled and matrix_synapse_ext_synapse_http_antispam_config_base_url == matrix_bot_draupnir_synapse_http_antispam_config_base_url and matrix_bot_draupnir_container_network != matrix_synapse_container_network) else [])
|
||||
) | unique
|
||||
}}
|
||||
|
||||
@ -4930,6 +4932,13 @@ matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_
|
||||
# Disable creation of media repository Synapse worker when using media-repo
|
||||
matrix_synapse_ext_media_repo_enabled: "{{ matrix_media_repo_enabled }}"
|
||||
|
||||
matrix_synapse_ext_synapse_http_antispam_enabled: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled }}"
|
||||
matrix_synapse_ext_synapse_http_antispam_config_base_url: "{{ matrix_bot_draupnir_synapse_http_antispam_config_base_url if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else '' }}"
|
||||
matrix_synapse_ext_synapse_http_antispam_config_authorization: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else '' }}"
|
||||
matrix_synapse_ext_synapse_http_antispam_config_enabled_callbacks: "{{ matrix_bot_draupnir_synapse_http_antispam_config_enabled_callbacks if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else [] }}"
|
||||
matrix_synapse_ext_synapse_http_antispam_config_fail_open: "{{ matrix_bot_draupnir_synapse_http_antispam_config_fail_open if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else {} }}"
|
||||
matrix_synapse_ext_synapse_http_antispam_config_async: "{{ matrix_bot_draupnir_synapse_http_antispam_config_async if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else {} }}"
|
||||
|
||||
# Enable Synapse statistics reporting when using synapse-usage-exporter
|
||||
matrix_synapse_report_stats: "{{ matrix_synapse_usage_exporter_enabled }}"
|
||||
matrix_synapse_report_stats_endpoint: "{{ (('http://' + matrix_synapse_usage_exporter_identifier + ':' + matrix_synapse_usage_exporter_container_port | string + '/report-usage-stats/push') if matrix_synapse_usage_exporter_enabled else '') }}"
|
||||
|
@ -2,7 +2,7 @@ alabaster==1.0.0
|
||||
babel==2.17.0
|
||||
certifi==2025.4.26
|
||||
charset-normalizer==3.4.2
|
||||
click==8.1.8
|
||||
click==8.2.0
|
||||
docutils==0.21.2
|
||||
idna==3.10
|
||||
imagesize==1.4.1
|
||||
@ -17,8 +17,8 @@ packaging==25.0
|
||||
Pygments==2.19.1
|
||||
PyYAML==6.0.2
|
||||
requests==2.32.3
|
||||
setuptools==80.3.1
|
||||
snowballstemmer==2.2.0
|
||||
setuptools==80.7.1
|
||||
snowballstemmer==3.0.1
|
||||
Sphinx==8.2.3
|
||||
sphinx-intl==2.3.1
|
||||
sphinx-markdown-builder==0.6.8
|
||||
|
@ -49,7 +49,7 @@
|
||||
version: v17-3
|
||||
name: postgres_backup
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus.git
|
||||
version: v3.3.1-0
|
||||
version: v3.4.0-1
|
||||
name: prometheus
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-node-exporter.git
|
||||
version: v1.9.1-3
|
||||
|
@ -17,7 +17,7 @@ matrix_bot_baibot_container_repo_version: "{{ 'main' if matrix_bot_baibot_versio
|
||||
matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/etkecc/baibot
|
||||
matrix_bot_baibot_version: v1.6.0
|
||||
matrix_bot_baibot_version: v1.7.2
|
||||
matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_registry_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
|
||||
matrix_bot_baibot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else matrix_bot_baibot_container_image_registry_prefix_upstream }}"
|
||||
matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"
|
||||
@ -389,9 +389,10 @@ matrix_bot_baibot_config_agents_static_definitions_openai_config_text_to_speech_
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_to_speech_response_format: opus
|
||||
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_enabled: true
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_model_id: dall-e-3
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_style: vivid
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_size: 1024x1024
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_model_id: gpt-image-1
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_style: null
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_size: null
|
||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_quality: null
|
||||
|
||||
########################################################################################
|
||||
# #
|
||||
|
@ -35,4 +35,5 @@ image_generation:
|
||||
model_id: {{ matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_model_id | to_json }}
|
||||
style: {{ matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_style | to_json }}
|
||||
size: {{ matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_size | to_json }}
|
||||
quality: {{ matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_quality | to_json }}
|
||||
{% endif %}
|
||||
|
@ -28,8 +28,18 @@ matrix_bot_draupnir_config_path: "{{ matrix_bot_draupnir_base_path }}/config"
|
||||
matrix_bot_draupnir_data_path: "{{ matrix_bot_draupnir_base_path }}/data"
|
||||
matrix_bot_draupnir_docker_src_files_path: "{{ matrix_bot_draupnir_base_path }}/docker-src"
|
||||
|
||||
matrix_bot_draupnir_config_web_enabled: "{{ matrix_bot_draupnir_config_web_abuseReporting or matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled }}" # noqa var-naming
|
||||
|
||||
matrix_bot_draupnir_config_web_abuseReporting: false # noqa var-naming
|
||||
matrix_bot_draupnir_config_web_enabled: "{{ matrix_bot_draupnir_config_web_abuseReporting }}" # noqa var-naming
|
||||
|
||||
matrix_bot_draupnir_config_web_port: 8080
|
||||
|
||||
# These variables are used for turning on the integration between the synapseHTTPAntispam module and Draupnir.
|
||||
# Authorisation is a shared secret between Draupnir and the module just like is used by Appservices and the homeserver
|
||||
# therefore the same creation mechanism is used here too.
|
||||
matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled: false # noqa var-naming
|
||||
matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization: '' # noqa var-naming
|
||||
|
||||
matrix_bot_draupnir_config_displayReports: "{{ matrix_bot_draupnir_config_web_abuseReporting }}" # noqa var-naming
|
||||
|
||||
matrix_bot_draupnir_container_network: ""
|
||||
@ -129,6 +139,27 @@ matrix_bot_draupnir_config_admin_enableMakeRoomAdminCommand: false # noqa var-n
|
||||
# This config option has diminished improvements for bots on extremely fast homeservers or very very small bots on fast homeservers.
|
||||
matrix_bot_draupnir_config_roomStateBackingStore_enabled: true # noqa var-naming
|
||||
|
||||
matrix_bot_draupnir_web_url: 'http://matrix-bot-draupnir'
|
||||
|
||||
# This controls the URL that the module targets in Draupnir.
|
||||
matrix_bot_draupnir_synapse_http_antispam_config_base_url: "{{ matrix_bot_draupnir_web_url }}:{{ matrix_bot_draupnir_config_web_port }}/api/1/spam_check"
|
||||
|
||||
# These variables control the configuration of the Synapse module as the configuration is highly consumer dependent.
|
||||
# Therefore the module is configured from Draupnir because the consumer of the module determines what settings are relevant.
|
||||
|
||||
matrix_bot_draupnir_synapse_http_antispam_config_enabled_callbacks:
|
||||
- check_event_for_spam
|
||||
- user_may_invite
|
||||
- user_may_join_room
|
||||
|
||||
matrix_bot_draupnir_synapse_http_antispam_config_fail_open:
|
||||
check_event_for_spam: true
|
||||
user_may_invite: true
|
||||
user_may_join_room: true
|
||||
|
||||
matrix_bot_draupnir_synapse_http_antispam_config_async:
|
||||
check_event_for_spam: true
|
||||
|
||||
# Default configuration template which covers the generic use case.
|
||||
# You can customize it by controlling the various variables inside it.
|
||||
#
|
||||
|
@ -12,7 +12,7 @@ traefik.enable=true
|
||||
traefik.docker.network={{ matrix_bot_draupnir_container_labels_traefik_docker_network }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.services.matrix-bot-draupnir.loadbalancer.server.port=8080
|
||||
traefik.http.services.matrix-bot-draupnir.loadbalancer.server.port={{ matrix_bot_draupnir_config_web_port }}
|
||||
|
||||
{% if matrix_bot_draupnir_config_web_abuseReporting %}
|
||||
############################################################
|
||||
|
@ -266,7 +266,7 @@ web:
|
||||
enabled: true
|
||||
|
||||
# The port to expose the webserver on. Defaults to 8080.
|
||||
port: 8080
|
||||
port: {{ matrix_bot_draupnir_config_web_port | to_json }}
|
||||
|
||||
# The address to listen for requests on. Defaults to only the current
|
||||
# computer.
|
||||
@ -286,6 +286,18 @@ web:
|
||||
abuseReporting:
|
||||
# Whether to enable this feature.
|
||||
enabled: {{ matrix_bot_draupnir_config_web_abuseReporting | to_json }}
|
||||
# Whether to setup a endpoints for synapse-http-antispam
|
||||
# https://github.com/maunium/synapse-http-antispam
|
||||
# this is required for some features of Draupnir,
|
||||
# such as support for room takedown policies.
|
||||
#
|
||||
# Please FOLLOW the instructions here:
|
||||
# https://the-draupnir-project.github.io/draupnir-documentation/bot/synapse-http-antispam
|
||||
synapseHTTPAntispam:
|
||||
enabled: {{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled | to_json }}
|
||||
# This is a secret that you must place into your synapse module config
|
||||
# https://github.com/maunium/synapse-http-antispam?tab=readme-ov-file#configuration
|
||||
authorization: {{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization | to_json }}
|
||||
{% endif %}
|
||||
|
||||
# FIXME: This configuration option is currently broken in the playbook as admin APIs cannot
|
||||
|
@ -25,7 +25,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--read-only \
|
||||
--network={{ matrix_bot_draupnir_container_network }} \
|
||||
{% if matrix_bot_draupnir_container_http_host_bind_port %}
|
||||
-p {{ matrix_bot_draupnir_container_http_host_bind_port }}:8080 \
|
||||
-p {{ matrix_bot_draupnir_container_http_host_bind_port }}:{{ matrix_bot_draupnir_config_web_port }} \
|
||||
{% endif %}
|
||||
--label-file={{ matrix_bot_draupnir_base_path }}/labels \
|
||||
--mount type=bind,src={{ matrix_bot_draupnir_config_path }},dst=/data/config,ro \
|
||||
|
@ -17,7 +17,7 @@
|
||||
matrix_bot_mjolnir_enabled: true
|
||||
|
||||
# renovate: datasource=docker depName=matrixdotorg/mjolnir
|
||||
matrix_bot_mjolnir_version: "v1.9.2"
|
||||
matrix_bot_mjolnir_version: "v1.10.0"
|
||||
|
||||
matrix_bot_mjolnir_container_image_self_build: false
|
||||
matrix_bot_mjolnir_container_image_self_build_repo: "https://github.com/matrix-org/mjolnir.git"
|
||||
|
@ -29,7 +29,7 @@ matrix_hookshot_container_additional_networks_auto: []
|
||||
matrix_hookshot_container_additional_networks_custom: []
|
||||
|
||||
# renovate: datasource=docker depName=halfshot/matrix-hookshot
|
||||
matrix_hookshot_version: 6.0.3
|
||||
matrix_hookshot_version: 7.0.0
|
||||
|
||||
matrix_hookshot_docker_image: "{{ matrix_hookshot_docker_image_registry_prefix }}matrix-org/matrix-hookshot:{{ matrix_hookshot_version }}"
|
||||
matrix_hookshot_docker_image_registry_prefix: "{{ 'localhost/' if matrix_hookshot_container_image_self_build else matrix_hookshot_docker_image_registry_prefix_upstream }}"
|
||||
@ -187,16 +187,6 @@ matrix_hookshot_feeds_enabled: true
|
||||
matrix_hookshot_feeds_pollIntervalSeconds: 600 # noqa var-naming
|
||||
matrix_hookshot_feeds_pollTimeoutSeconds: 30 # noqa var-naming
|
||||
|
||||
|
||||
matrix_hookshot_provisioning_enabled: false
|
||||
# There is no need to edit ports. use matrix_hookshot_container_http_host_bind_ports below to expose ports instead.
|
||||
matrix_hookshot_provisioning_port: 9002
|
||||
matrix_hookshot_provisioning_secret: ''
|
||||
# Provisioning will be automatically enabled if Dimension is enabled and you have provided a provisioning secret, unless you override it
|
||||
matrix_hookshot_provisioning_internal: "/v1"
|
||||
matrix_hookshot_provisioning_hostname: "{{ matrix_hookshot_public_hostname }}"
|
||||
matrix_hookshot_provisioning_endpoint: "{{ matrix_hookshot_public_endpoint }}{{ matrix_hookshot_provisioning_internal }}"
|
||||
|
||||
# Valid values: error, warn, info, debug
|
||||
matrix_hookshot_logging_level: warn
|
||||
|
||||
@ -289,15 +279,7 @@ matrix_hookshot_container_labels_widgets_traefik_entrypoints: "{{ matrix_hooksho
|
||||
matrix_hookshot_container_labels_widgets_traefik_tls: "{{ matrix_hookshot_container_labels_widgets_traefik_entrypoints != 'web' }}"
|
||||
matrix_hookshot_container_labels_widgets_traefik_tls_certResolver: "{{ matrix_hookshot_container_labels_traefik_tls_certResolver }}" # noqa var-naming
|
||||
|
||||
# Controls whether labels will be added that expose Hookshot's provisioning endpoint
|
||||
matrix_hookshot_container_labels_provisioning_enabled: "{{ matrix_hookshot_provisioning_enabled }}"
|
||||
matrix_hookshot_container_labels_provisioning_traefik_rule: "Host(`{{ matrix_hookshot_provisioning_hostname }}`) && PathPrefix(`{{ matrix_hookshot_provisioning_endpoint }}`)"
|
||||
matrix_hookshot_container_labels_provisioning_traefik_priority: 0
|
||||
matrix_hookshot_container_labels_provisioning_traefik_entrypoints: "{{ matrix_hookshot_container_labels_traefik_entrypoints }}"
|
||||
matrix_hookshot_container_labels_provisioning_traefik_tls: "{{ matrix_hookshot_container_labels_provisioning_traefik_entrypoints != 'web' }}"
|
||||
matrix_hookshot_container_labels_provisioning_traefik_tls_certResolver: "{{ matrix_hookshot_container_labels_traefik_tls_certResolver }}" # noqa var-naming
|
||||
|
||||
# Controls whether labels will be added that expose Hookshot's provisioning endpoint
|
||||
# Controls whether labels will be added that expose Hookshot's metrics endpoint
|
||||
matrix_hookshot_container_labels_metrics_enabled: "{{ matrix_hookshot_metrics_enabled and matrix_hookshot_metrics_proxying_enabled }}"
|
||||
matrix_hookshot_container_labels_metrics_traefik_rule: "Host(`{{ matrix_hookshot_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_hookshot_metrics_proxying_path_prefix }}`)"
|
||||
matrix_hookshot_container_labels_metrics_traefik_priority: 0
|
||||
|
@ -39,6 +39,13 @@
|
||||
- {'old': 'matrix_hookshot_queue_port', 'new': 'matrix_hookshot_cache_redis_port'}
|
||||
- {'old': 'matrix_hookshot_experimental_encryption_enabled', 'new': 'matrix_hookshot_encryption_enabled'}
|
||||
- {'old': 'matrix_hookshot_docker_image_name_prefix', 'new': 'matrix_hookshot_docker_image_registry_prefix'}
|
||||
- {'old': 'matrix_hookshot_provisioning_enabled', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
|
||||
- {'old': 'matrix_hookshot_provisioning_port', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
|
||||
- {'old': 'matrix_hookshot_provisioning_secret', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
|
||||
- {'old': 'matrix_hookshot_provisioning_internal', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
|
||||
- {'old': 'matrix_hookshot_provisioning_hostname', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
|
||||
- {'old': 'matrix_hookshot_provisioning_endpoint', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
|
||||
- {'old': 'matrix_hookshot_container_labels_provisioning_enabled', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
|
||||
|
||||
- name: Fail if required Hookshot settings not defined
|
||||
ansible.builtin.fail:
|
||||
@ -92,14 +99,6 @@
|
||||
You need to define at least one Figma instance in `matrix_hookshot_figma_instances` to enable Figma.
|
||||
when: "matrix_hookshot_figma_enabled and matrix_hookshot_figma_instances | length == 0"
|
||||
|
||||
- name: Fail if required provisioning settings not defined
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`) to enable provisioning.
|
||||
when: "matrix_hookshot_provisioning_enabled and vars[item] == ''"
|
||||
with_items:
|
||||
- "matrix_hookshot_provisioning_secret"
|
||||
|
||||
- name: Fail if no Redis queue enabled when Hookshot encryption is enabled
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
|
@ -89,12 +89,6 @@ feeds:
|
||||
pollIntervalSeconds: {{ matrix_hookshot_feeds_pollIntervalSeconds | to_json }}
|
||||
pollTimeoutSeconds: {{ matrix_hookshot_feeds_pollTimeoutSeconds | to_json }}
|
||||
{% endif %}
|
||||
{% if matrix_hookshot_provisioning_enabled %}
|
||||
provisioning:
|
||||
# (Optional) Provisioning API for integration managers
|
||||
#
|
||||
secret: {{ matrix_hookshot_provisioning_secret | to_json }}
|
||||
{% endif %}
|
||||
passFile:
|
||||
# A passkey used to encrypt tokens stored inside the bridge.
|
||||
# Run openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096 to generate
|
||||
@ -143,7 +137,7 @@ permissions: {{ matrix_hookshot_permissions | to_json }}
|
||||
listeners:
|
||||
# (Optional) HTTP Listener configuration.
|
||||
# Bind resource endpoints to ports and addresses.
|
||||
# 'resources' may be any of webhooks, widgets, metrics, provisioning, appservice
|
||||
# 'resources' may be any of webhooks, widgets, metrics
|
||||
#
|
||||
{# always enabled since all services need it #}
|
||||
- port: {{ matrix_hookshot_webhook_port }}
|
||||
@ -156,12 +150,6 @@ listeners:
|
||||
resources:
|
||||
- metrics
|
||||
{% endif %}
|
||||
{% if matrix_hookshot_provisioning_enabled %}
|
||||
- port: {{ matrix_hookshot_provisioning_port }}
|
||||
bindAddress: 0.0.0.0
|
||||
resources:
|
||||
- provisioning
|
||||
{% endif %}
|
||||
{% if matrix_hookshot_widgets_enabled %}
|
||||
- port: {{ matrix_hookshot_widgets_port }}
|
||||
bindAddress: 0.0.0.0
|
||||
|
@ -14,7 +14,6 @@ traefik.docker.network={{ matrix_hookshot_container_labels_traefik_docker_networ
|
||||
traefik.http.services.matrix-hookshot-webhooks.loadbalancer.server.port={{ matrix_hookshot_webhook_port }}
|
||||
traefik.http.services.matrix-hookshot-appservice.loadbalancer.server.port={{ matrix_hookshot_appservice_port }}
|
||||
traefik.http.services.matrix-hookshot-widgets.loadbalancer.server.port={{ matrix_hookshot_widgets_port }}
|
||||
traefik.http.services.matrix-hookshot-provisioning.loadbalancer.server.port={{ matrix_hookshot_provisioning_port }}
|
||||
traefik.http.services.matrix-hookshot-metrics.loadbalancer.server.port={{ matrix_hookshot_metrics_port }}
|
||||
|
||||
{% if matrix_hookshot_container_labels_webhooks_enabled %}
|
||||
@ -118,37 +117,6 @@ traefik.http.routers.matrix-hookshot-widgets.tls.certResolver={{ matrix_hookshot
|
||||
############################################################
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_hookshot_container_labels_provisioning_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Provisioning #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
traefik.http.middlewares.matrix-hookshot-provisioning-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_provisioning_endpoint }}
|
||||
|
||||
traefik.http.routers.matrix-hookshot-provisioning.rule={{ matrix_hookshot_container_labels_provisioning_traefik_rule }}
|
||||
traefik.http.routers.matrix-hookshot-provisioning.middlewares=matrix-hookshot-provisioning-strip-prefix
|
||||
|
||||
{% if matrix_hookshot_container_labels_provisioning_traefik_priority | int > 0 %}
|
||||
traefik.http.routers.matrix-hookshot-provisioning.priority={{ matrix_hookshot_container_labels_provisioning_traefik_priority }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.matrix-hookshot-provisioning.service=matrix-hookshot-provisioning
|
||||
traefik.http.routers.matrix-hookshot-provisioning.entrypoints={{ matrix_hookshot_container_labels_provisioning_traefik_entrypoints }}
|
||||
|
||||
traefik.http.routers.matrix-hookshot-provisioning.tls={{ matrix_hookshot_container_labels_provisioning_traefik_tls | to_json }}
|
||||
{% if matrix_hookshot_container_labels_provisioning_traefik_tls %}
|
||||
traefik.http.routers.matrix-hookshot-provisioning.tls.certResolver={{ matrix_hookshot_container_labels_provisioning_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Provisioning #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if matrix_hookshot_container_labels_metrics_enabled %}
|
||||
############################################################
|
||||
|
@ -18,7 +18,7 @@ matrix_mautrix_gmessages_container_image_self_build_repo: "https://github.com/ma
|
||||
matrix_mautrix_gmessages_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_gmessages_version == 'latest' else matrix_mautrix_gmessages_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/gmessages
|
||||
matrix_mautrix_gmessages_version: v0.6.1
|
||||
matrix_mautrix_gmessages_version: v0.6.2
|
||||
|
||||
# See: https://mau.dev/mautrix/gmessages/container_registry
|
||||
matrix_mautrix_gmessages_docker_image: "{{ matrix_mautrix_gmessages_docker_image_registry_prefix }}mautrix/gmessages:{{ matrix_mautrix_gmessages_version }}"
|
||||
|
@ -25,7 +25,7 @@ matrix_mautrix_signal_container_image_self_build_repo: "https://mau.dev/mautrix/
|
||||
matrix_mautrix_signal_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_signal_version == 'latest' else matrix_mautrix_signal_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/signal
|
||||
matrix_mautrix_signal_version: v0.8.2
|
||||
matrix_mautrix_signal_version: v0.8.3
|
||||
|
||||
# See: https://mau.dev/mautrix/signal/container_registry
|
||||
matrix_mautrix_signal_docker_image: "{{ matrix_mautrix_signal_docker_image_registry_prefix }}mautrix/signal:{{ matrix_mautrix_signal_docker_image_tag }}"
|
||||
|
@ -22,7 +22,7 @@ matrix_mautrix_twitter_container_image_self_build_repo: "https://github.com/maut
|
||||
matrix_mautrix_twitter_container_image_self_build_repo_version: "{{ 'master' if matrix_mautrix_twitter_version == 'latest' else matrix_mautrix_twitter_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/twitter
|
||||
matrix_mautrix_twitter_version: v0.4.0
|
||||
matrix_mautrix_twitter_version: v0.4.1
|
||||
# See: https://mau.dev/tulir/mautrix-twitter/container_registry
|
||||
matrix_mautrix_twitter_docker_image: "{{ matrix_mautrix_twitter_docker_image_registry_prefix }}mautrix/twitter:{{ matrix_mautrix_twitter_version }}"
|
||||
matrix_mautrix_twitter_docker_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_twitter_container_image_self_build else matrix_mautrix_twitter_docker_image_registry_prefix_upstream }}"
|
||||
|
@ -28,7 +28,7 @@ matrix_mautrix_whatsapp_container_image_self_build_repo: "https://mau.dev/mautri
|
||||
matrix_mautrix_whatsapp_container_image_self_build_branch: "{{ 'master' if matrix_mautrix_whatsapp_version == 'latest' else matrix_mautrix_whatsapp_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/whatsapp
|
||||
matrix_mautrix_whatsapp_version: v0.12.0
|
||||
matrix_mautrix_whatsapp_version: v0.12.1
|
||||
|
||||
# See: https://mau.dev/mautrix/whatsapp/container_registry
|
||||
matrix_mautrix_whatsapp_docker_image: "{{ matrix_mautrix_whatsapp_docker_image_registry_prefix }}mautrix/whatsapp:{{ matrix_mautrix_whatsapp_version }}"
|
||||
|
@ -17,7 +17,7 @@ matrix_client_cinny_container_image_self_build: false
|
||||
matrix_client_cinny_container_image_self_build_repo: "https://github.com/ajbura/cinny.git"
|
||||
|
||||
# renovate: datasource=docker depName=ajbura/cinny
|
||||
matrix_client_cinny_version: v4.6.0
|
||||
matrix_client_cinny_version: v4.7.0
|
||||
matrix_client_cinny_docker_image: "{{ matrix_client_cinny_docker_image_registry_prefix }}ajbura/cinny:{{ matrix_client_cinny_version }}"
|
||||
matrix_client_cinny_docker_image_registry_prefix: "{{ 'localhost/' if matrix_client_cinny_container_image_self_build else matrix_client_cinny_docker_image_registry_prefix_upstream }}"
|
||||
matrix_client_cinny_docker_image_registry_prefix_upstream: "{{ matrix_client_cinny_docker_image_registry_prefix_upstream_default }}"
|
||||
|
@ -13,7 +13,7 @@ matrix_client_fluffychat_container_image_self_build_repo: "https://github.com/et
|
||||
matrix_client_fluffychat_container_image_self_build_version: "{{ 'main' if matrix_client_fluffychat_version == 'latest' else matrix_client_fluffychat_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/etkecc/fluffychat-web
|
||||
matrix_client_fluffychat_version: v1.26.0
|
||||
matrix_client_fluffychat_version: v1.26.1
|
||||
matrix_client_fluffychat_docker_image: "{{ matrix_client_fluffychat_docker_image_registry_prefix }}etkecc/fluffychat-web:{{ matrix_client_fluffychat_version }}"
|
||||
matrix_client_fluffychat_docker_image_registry_prefix: "{{ 'localhost/' if matrix_client_fluffychat_container_image_self_build else matrix_client_fluffychat_docker_image_registry_prefix_upstream }}"
|
||||
matrix_client_fluffychat_docker_image_registry_prefix_upstream: "{{ matrix_client_fluffychat_docker_image_registry_prefix_upstream_default }}"
|
||||
|
@ -19,7 +19,7 @@ matrix_conduit_docker_image_registry_prefix: "{{ matrix_conduit_docker_image_reg
|
||||
matrix_conduit_docker_image_registry_prefix_upstream: "{{ matrix_conduit_docker_image_registry_prefix_upstream_default }}"
|
||||
matrix_conduit_docker_image_registry_prefix_upstream_default: docker.io/
|
||||
# renovate: datasource=docker depName=matrixconduit/matrix-conduit
|
||||
matrix_conduit_docker_image_tag: "v0.9.0"
|
||||
matrix_conduit_docker_image_tag: "v0.10.3"
|
||||
matrix_conduit_docker_image_force_pull: "{{ matrix_conduit_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_conduit_base_path: "{{ matrix_base_data_path }}/conduit"
|
||||
|
@ -21,7 +21,7 @@ matrix_element_call_enabled: false
|
||||
matrix_rtc_enabled: "{{ matrix_element_call_enabled }}"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/element-hq/element-call
|
||||
matrix_element_call_version: v0.10.0
|
||||
matrix_element_call_version: v0.11.1
|
||||
|
||||
matrix_element_call_scheme: https
|
||||
|
||||
|
@ -25,7 +25,7 @@ matrix_synapse_admin_container_image_self_build: false
|
||||
matrix_synapse_admin_container_image_self_build_repo: "https://github.com/etkecc/synapse-admin.git"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/etkecc/synapse-admin
|
||||
matrix_synapse_admin_version: v0.10.3-etke39
|
||||
matrix_synapse_admin_version: v0.10.4-etke41
|
||||
matrix_synapse_admin_docker_image: "{{ matrix_synapse_admin_docker_image_registry_prefix }}etkecc/synapse-admin:{{ matrix_synapse_admin_version }}"
|
||||
matrix_synapse_admin_docker_image_registry_prefix: "{{ 'localhost/' if matrix_synapse_admin_container_image_self_build else matrix_synapse_admin_docker_image_registry_prefix_upstream }}"
|
||||
matrix_synapse_admin_docker_image_registry_prefix_upstream: "{{ matrix_synapse_admin_docker_image_registry_prefix_upstream_default }}"
|
||||
|
@ -1386,7 +1386,7 @@ matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeserve
|
||||
matrix_synapse_ext_spam_checker_mjolnir_antispam_enabled: false
|
||||
matrix_synapse_ext_spam_checker_mjolnir_antispam_git_repository_url: "https://github.com/matrix-org/mjolnir"
|
||||
# renovate: datasource=docker depName=matrixdotorg/mjolnir
|
||||
matrix_synapse_ext_spam_checker_mjolnir_antispam_git_version: "v1.9.2"
|
||||
matrix_synapse_ext_spam_checker_mjolnir_antispam_git_version: "v1.10.0"
|
||||
matrix_synapse_ext_spam_checker_mjolnir_antispam_config_block_invites: true
|
||||
# Flag messages sent by servers/users in the ban lists as spam. Currently
|
||||
# this means that spammy messages will appear as empty to users. Default
|
||||
@ -1412,6 +1412,38 @@ matrix_synapse_ext_spam_checker_mjolnir_antispam_config:
|
||||
ban_lists: "{{ matrix_synapse_ext_spam_checker_mjolnir_antispam_config_ban_lists }}"
|
||||
message_max_length: "{{ matrix_synapse_ext_spam_checker_mjolnir_antispam_config_message_max_length }}"
|
||||
|
||||
# Enable this to activate the synapse-http-antispam module.
|
||||
# See: github.com/maunium/synapse-http-antispam
|
||||
matrix_synapse_ext_synapse_http_antispam_enabled: false
|
||||
matrix_synapse_ext_synapse_http_antispam_git_repository_url: "https://github.com/maunium/synapse-http-antispam"
|
||||
# renovate: datasource=github-releases depName=maunium/synapse-http-antispam
|
||||
matrix_synapse_ext_synapse_http_antispam_git_version: "v0.4.0"
|
||||
# Where Synapse can locate the consumer of the antispam API. Currently
|
||||
# Draupnir is the only consumer of this API that is playbook supported.
|
||||
# But https://github.com/maunium/meowlnir also supports the API.
|
||||
matrix_synapse_ext_synapse_http_antispam_config_base_url: ''
|
||||
# This is a shared secret that is established between the consumer and the
|
||||
# homeserver a lot like how AS authentication is done. This is fully managed
|
||||
# the same way AS authentication is by the playbook.
|
||||
matrix_synapse_ext_synapse_http_antispam_config_authorization: ''
|
||||
# This controls what callbacks are activated. This list is fully dependent on what consumer is in play.
|
||||
# And what capabilities said consumer should or shouldn't have. There are also performance implications
|
||||
# to these choices.
|
||||
matrix_synapse_ext_synapse_http_antispam_config_enabled_callbacks: []
|
||||
# Controls if a loss of connectivity to the consumer results in fail open or closed.
|
||||
# As in if failure results in events getting flagged automatically as spam or not.
|
||||
matrix_synapse_ext_synapse_http_antispam_config_fail_open: {}
|
||||
# Controls if the checking is blocking or not. This allows the homeserver to skip waiting for a consumer response.
|
||||
matrix_synapse_ext_synapse_http_antispam_config_async: {}
|
||||
# Actual configuration passed to the synapse-http-antispam module
|
||||
matrix_synapse_ext_synapse_http_antispam_config: "{{ matrix_synapse_ext_synapse_http_antispam_config_yaml | from_yaml }}"
|
||||
matrix_synapse_ext_synapse_http_antispam_config_yaml: |
|
||||
base_url: {{ matrix_synapse_ext_synapse_http_antispam_config_base_url | to_json }}
|
||||
authorization: {{ matrix_synapse_ext_synapse_http_antispam_config_authorization | to_json }}
|
||||
enabled_callbacks: {{ matrix_synapse_ext_synapse_http_antispam_config_enabled_callbacks | to_json }}
|
||||
fail_open: {{ matrix_synapse_ext_synapse_http_antispam_config_fail_open | to_json }}
|
||||
async: {{ matrix_synapse_ext_synapse_http_antispam_config_async | to_json }}
|
||||
|
||||
# Enable this to activate the E2EE disabling Synapse module.
|
||||
# See: https://github.com/digitalentity/matrix_encryption_disabler
|
||||
matrix_synapse_ext_encryption_disabler_enabled: false
|
||||
|
@ -66,6 +66,19 @@
|
||||
- when: matrix_synapse_ext_spam_checker_mjolnir_antispam_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/mjolnir-antispam/setup_install.yml"
|
||||
|
||||
# synapse-http-antispam
|
||||
- tags:
|
||||
- setup-all
|
||||
- setup-synapse
|
||||
- install-all
|
||||
- install-synapse
|
||||
block:
|
||||
- when: matrix_synapse_ext_synapse_http_antispam_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/synapse-http-antispam/validate_config.yml"
|
||||
|
||||
- when: matrix_synapse_ext_synapse_http_antispam_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/synapse-http-antispam/setup_install.yml"
|
||||
|
||||
# s3-storage-provider
|
||||
- tags:
|
||||
- setup-all
|
||||
|
@ -0,0 +1,37 @@
|
||||
# SPDX-FileCopyrightText: 2025 MDAD project contributors
|
||||
# SPDX-FileCopyrightText: 2025 Catalan Lover <catalanlover@protonmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
---
|
||||
|
||||
- name: Ensure git installed
|
||||
ansible.builtin.package:
|
||||
name: git
|
||||
state: present
|
||||
|
||||
- name: Clone synapse-http-antispam git repository
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_synapse_ext_synapse_http_antispam_git_repository_url }}"
|
||||
version: "{{ matrix_synapse_ext_synapse_http_antispam_git_version }}"
|
||||
dest: "{{ matrix_synapse_ext_path }}/synapse-http-antispam"
|
||||
become: true
|
||||
become_user: "{{ matrix_synapse_username }}"
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_synapse_modules: >
|
||||
{{
|
||||
matrix_synapse_modules | default([])
|
||||
+
|
||||
[{
|
||||
"module": "synapse_http_antispam.HTTPAntispam",
|
||||
"config": matrix_synapse_ext_synapse_http_antispam_config,
|
||||
}]
|
||||
}}
|
||||
|
||||
matrix_synapse_container_extra_arguments: >
|
||||
{{
|
||||
matrix_synapse_container_extra_arguments | default([])
|
||||
+
|
||||
["--mount type=bind,src={{ matrix_synapse_ext_path }}/synapse-http-antispam/synapse_http_antispam.py,dst={{ matrix_synapse_in_container_python_packages_path }}/synapse_http_antispam.py,ro"]
|
||||
}}
|
@ -0,0 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2025 MDAD project contributors
|
||||
# SPDX-FileCopyrightText: 2025 Catalan Lover <catalanlover@protonmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
---
|
||||
|
||||
- name: Ensure synapse-http-antispam doesn't exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_synapse_ext_path }}/synapse-http-antispam"
|
||||
state: absent
|
@ -0,0 +1,21 @@
|
||||
# SPDX-FileCopyrightText: 2025 MDAD project contributors
|
||||
# SPDX-FileCopyrightText: 2025 Catalan Lover <catalanlover@protonmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
---
|
||||
- name: Fail if required synapse-http-antispam settings not defined
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`) for using synapse-http-antispam.
|
||||
when: "vars[item] == ''"
|
||||
with_items:
|
||||
- "matrix_synapse_ext_synapse_http_antispam_enabled"
|
||||
- "matrix_synapse_ext_synapse_http_antispam_config_base_url"
|
||||
- "matrix_synapse_ext_synapse_http_antispam_config_authorization"
|
||||
|
||||
- name: Fail if required matrix_synapse_ext_synapse_http_antispam_config_base_url looks invalid
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
`matrix_synapse_ext_synapse_http_antispam_config_base_url` needs to look like a URL (`http://` or `https://` prefix).
|
||||
when: "not matrix_synapse_ext_synapse_http_antispam_config_base_url.startswith('http')"
|
Reference in New Issue
Block a user