| @@ -1,3 +1,11 @@ | |||
| # 2026-XX-XX | |||
| ## matrix-registration-bot has been removed from the playbook | |||
| The [matrix-registration-bot](./docs/configuring-playbook-bot-matrix-registration-bot.md) service has been removed from the playbook, as it has been unmaintained. | |||
| The playbook will let you know if you're using any `matrix_bot_matrix_registration_bot_*` variables. You'll need to remove them from `vars.yml` and potentially [uninstall the component manually](./docs/configuring-playbook-bot-matrix-registration-bot.md#uninstalling-the-component-manually). | |||
| # 2026-05-24 | |||
| ## matrix-ldap-registration-proxy has been removed from the playbook | |||
| @@ -144,7 +144,6 @@ Bots provide various additional functionality to your installation. | |||
| | ---- | -------- | ----------- | ------------- | | |||
| | [baibot](https://github.com/etkecc/baibot) | ❌ | Bot that exposes the power of [AI](https://en.wikipedia.org/wiki/Artificial_intelligence) / [Large Language Models](https://en.wikipedia.org/wiki/Large_language_model) to you | [Link](docs/configuring-playbook-bot-baibot.md) | | |||
| | [matrix-reminder-bot](https://github.com/anoadragon453/matrix-reminder-bot) | ❌ | Bot for scheduling one-off & recurring reminders and alarms | [Link](docs/configuring-playbook-bot-matrix-reminder-bot.md) | | |||
| | [matrix-registration-bot](https://github.com/moan0s/matrix-registration-bot) | ❌ | Bot for invitations by creating and managing registration tokens | [Link](docs/configuring-playbook-bot-matrix-registration-bot.md) | | |||
| | [maubot](https://github.com/maubot/maubot) | ❌ | Plugin-based Matrix bot system | [Link](docs/configuring-playbook-bot-maubot.md) | | |||
| | [Honoroit](https://github.com/etkecc/honoroit) | ❌ | Helpdesk bot | [Link](docs/configuring-playbook-bot-honoroit.md) | | |||
| | [Mjolnir](https://github.com/matrix-org/mjolnir) | ❌ | Moderation tool for Matrix | [Link](docs/configuring-playbook-bot-mjolnir.md) | | |||
| @@ -1,103 +1,34 @@ | |||
| <!-- | |||
| SPDX-FileCopyrightText: 2022 - 2023 Julian-Samuel Gebühr | |||
| SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev | |||
| SPDX-FileCopyrightText: 2019 Edgars Voroboks | |||
| SPDX-FileCopyrightText: 2019 Eduardo Beltrame | |||
| SPDX-FileCopyrightText: 2019-2025 MDAD project contributors | |||
| SPDX-FileCopyrightText: 2019-2025 Slavi Pantaleev | |||
| SPDX-FileCopyrightText: 2020 Chris van Dijk | |||
| SPDX-FileCopyrightText: 2020 Tulir Asokan | |||
| SPDX-FileCopyrightText: 2020 jens quade | |||
| SPDX-FileCopyrightText: 2022 Dennis Ciba | |||
| SPDX-FileCopyrightText: 2022 Erick Wibben | |||
| SPDX-FileCopyrightText: 2022 Kim Brose | |||
| SPDX-FileCopyrightText: 2022 Kolja Lampe | |||
| SPDX-FileCopyrightText: 2023 - 2024 MDAD project contributors | |||
| SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara | |||
| SPDX-FileCopyrightText: 2022 Travis Ralston | |||
| SPDX-FileCopyrightText: 2022 Vladimir Panteleev | |||
| SPDX-FileCopyrightText: 2022 Yan Minagawa | |||
| SPDX-FileCopyrightText: 2022, 2023 Julian-Samuel Gebühr | |||
| SPDX-FileCopyrightText: 2024-2026 Suguru Hirahara | |||
| SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --> | |||
| # Setting up matrix-registration-bot (optional) | |||
| # Setting up matrix-registration-bot (optional, removed) | |||
| The playbook can install and configure [matrix-registration-bot](https://github.com/moan0s/matrix-registration-bot) for you. | |||
| 🪦 The playbook used to be able to install and configure [matrix-registration-bot](https://github.com/moan0s/matrix-registration-bot), but no longer includes this component, as it has been unmaintained. | |||
| The bot allows you to easily **create and manage registration tokens** aka. invitation codes. It can be used for an invitation-based server, where you invite someone by sending them a registration token (tokens look like this: `rbalQ0zkaDSRQCOp`). They can register as per normal but have to provide a valid registration token in the final step of the registration process. | |||
| ## Uninstalling the component manually | |||
| See the project's [documentation](https://github.com/moan0s/matrix-registration-bot/blob/master/README.md) to learn what it does and why it might be useful to you. | |||
| If you still have matrix-registration-bot installed on your Matrix server, the playbook can no longer help you uninstall it and you will need to do it manually. To uninstall manually, run these commands on the server: | |||
| ## Adjusting the playbook configuration | |||
| To enable the bot, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file: | |||
| ```yaml | |||
| matrix_bot_matrix_registration_bot_enabled: true | |||
| # By default, the playbook will set use the bot with a username like this: `@bot.matrix-registration-bot:example.com`. | |||
| # Uncomment and adjust this part if you'd like to use a username different than the default | |||
| # matrix_bot_matrix_registration_bot_matrix_user_id_localpart: bot.matrix-registration-bot | |||
| # Generate a strong password for the bot. You can create one with a command like `pwgen -s 64 1`. | |||
| matrix_bot_matrix_registration_bot_bot_password: PASSWORD_FOR_THE_BOT | |||
| # Enables registration | |||
| matrix_synapse_enable_registration: true | |||
| # Restrict registration to users with a token | |||
| matrix_synapse_registration_requires_token: true | |||
| # Set an optional command prefix for the bot. This can be any arbitrary string, including whitespace. | |||
| # Example: "!regbot " | |||
| matrix_bot_matrix_registration_bot_bot_prefix: "" | |||
| ``` | |||
| The bot account will be created automatically. | |||
| ### Extending the configuration | |||
| There are some additional things you may wish to configure about the bot. | |||
| Take a look at: | |||
| - `roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml` for some variables that you can customize via your `vars.yml` file | |||
| - `roles/custom/matrix-bot-matrix-registration-bot/templates/config.yaml.j2` for the bridge's default configuration | |||
| ## Installing | |||
| After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below: | |||
| <!-- NOTE: let this conservative command run (instead of install-all) to make it clear that failure of the command means something is clearly broken. --> | |||
| ```sh | |||
| ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-users-created,start | |||
| ``` | |||
| **Notes**: | |||
| - The `ensure-matrix-users-created` playbook tag makes the playbook automatically create the bot's user account. | |||
| - The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all` | |||
| `just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. | |||
| - If you change the bot password (`matrix_bot_matrix_registration_bot_bot_password` in your `vars.yml` file) subsequently, the bot user's credentials on the homeserver won't be updated automatically. If you'd like to change the bot user's password, use a tool like [Ketesa](configuring-playbook-ketesa.md) to change it, and then update `matrix_bot_matrix_registration_bot_bot_password` to let the bot know its new password. | |||
| ## Usage | |||
| To use the bot, start a chat with `@bot.matrix-registration-bot:example.com` (where `example.com` is your base domain, not the `matrix.` domain). | |||
| Send `help` to the bot to see the available commands. | |||
| You can also refer to the upstream [Usage documentation](https://github.com/moan0s/matrix-registration-bot#supported-commands). | |||
| If you have any questions, or if you need help setting it up, read the [troubleshooting guide](https://github.com/moan0s/matrix-registration-bot/blob/main/docs/troubleshooting.md) or join [#matrix-registration-bot:hyteck.de](https://matrix.to/#/#matrix-registration-bot:hyteck.de). | |||
| To clean the cache (session & encryption data) after you changed the bot's username, changed the login method from access_token to password etc… you can use: | |||
| ```sh | |||
| just run-tags bot-matrix-registration-bot-clean-cache | |||
| ``` | |||
| ## Troubleshooting | |||
| As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-bot-matrix-registration-bot`. | |||
| ### Increase logging verbosity | |||
| The default logging level for this component is `INFO`. If you want to increase the verbosity, add the following configuration to your `vars.yml` file and re-run the playbook: | |||
| systemctl disable --now matrix-bot-matrix-registration-bot.service | |||
| ```yaml | |||
| # Valid values: ERROR, INFO, DEBUG | |||
| matrix_bot_matrix_registration_bot_logging_level: DEBUG | |||
| rm -rf /matrix/matrix-registration-bot | |||
| ``` | |||
| @@ -192,8 +192,6 @@ Bots provide various additional functionality to your installation. | |||
| - [Setting up matrix-reminder-bot](configuring-playbook-bot-matrix-reminder-bot.md) — a bot to remind you about stuff | |||
| - [Setting up matrix-registration-bot](configuring-playbook-bot-matrix-registration-bot.md) — a bot to create and manage registration tokens to invite users | |||
| - [Setting up maubot](configuring-playbook-bot-maubot.md) — a plugin-based Matrix bot system | |||
| - [Setting up Honoroit](configuring-playbook-bot-honoroit.md) — a helpdesk bot | |||
| @@ -281,6 +279,8 @@ Various services that don't fit any other categories. | |||
| - [Setting up matrix-registration](configuring-playbook-matrix-registration.md) (removed; this component has been unmaintained) | |||
| - [Setting up matrix-registration-bot](configuring-playbook-bot-matrix-registration-bot.md) (removed; this component has been unmaintained) | |||
| - [Setting up Mautrix Facebook bridging](configuring-playbook-bridge-mautrix-facebook.md) (deprecated in favor of the Messenger/Instagram bridge with [mautrix-meta-messenger](configuring-playbook-bridge-mautrix-meta-messenger.md)) | |||
| - [Setting up Mautrix Instagram bridging](configuring-playbook-bridge-mautrix-instagram.md) (deprecated in favor of the Messenger/Instagram bridge with [mautrix-meta-instagram](configuring-playbook-bridge-mautrix-meta-instagram.md)) | |||
| @@ -118,7 +118,6 @@ Bots provide various additional functionality to your installation. | |||
| | ------- | --------------- | -------- | ----------- | | |||
| | [baibot](configuring-playbook-bot-baibot.md) | [etke.cc/baibot](https://ghcr.io/etkecc/baibot) | ❌ | Bot that exposes the power of [AI](https://en.wikipedia.org/wiki/Artificial_intelligence) / [Large Language Models](https://en.wikipedia.org/wiki/Large_language_model) to you | | |||
| | [matrix-reminder-bot](configuring-playbook-bot-matrix-reminder-bot.md) | [anoa/matrix-reminder-bot](https://hub.docker.com/r/anoa/matrix-reminder-bot) | ❌ | Bot for scheduling one-off & recurring reminders and alarms | | |||
| | [matrix-registration-bot](configuring-playbook-bot-matrix-registration-bot.md) | [moanos/matrix-registration-bot](https://hub.docker.com/r/moanos/matrix-registration-bot/) | ❌ | Bot for invitations by creating and managing registration tokens | | |||
| | [maubot](configuring-playbook-bot-maubot.md) | [dock.mau.dev/maubot/maubot](https://mau.dev/maubot/maubot/container_registry) | ❌ | Plugin-based Matrix bot system | | |||
| | [Honoroit](configuring-playbook-bot-honoroit.md) | [etke.cc/honoroit](https://github.com/etkecc/honoroit/container_registry) | ❌ | Helpdesk bot | | |||
| | [Mjolnir](configuring-playbook-bot-mjolnir.md) | [matrixdotorg/mjolnir](https://hub.docker.com/r/matrixdotorg/mjolnir) | ❌ | Moderation tool for Matrix | | |||
| @@ -179,6 +178,7 @@ The list of the deprecated or unmaintained services is available [here](configur | |||
| | [matrix-chatgpt-bot](configuring-playbook-bot-chatgpt.md) | [matrixgpt/matrix-chatgpt-bot](https://ghcr.io/matrixgpt/matrix-chatgpt-bot) | ❌ | Accessing ChatGPT via your favourite Matrix client | | |||
| | [matrix-ldap-registration-proxy](configuring-playbook-matrix-ldap-registration-proxy.md) | [activism.international/matrix_ldap_registration_proxy](https://gitlab.com/activism.international/matrix_ldap_registration_proxy/container_registry) | ❌ | Proxy that handles Matrix registration requests and forwards them to LDAP | | |||
| | [matrix-registration](configuring-playbook-matrix-registration.md) | [zeratax/matrix-registration](https://hub.docker.com/r/devture/zeratax-matrix-registration/) | ❌ | Simple python application to have a token based Matrix registration | | |||
| | [matrix-registration-bot](configuring-playbook-bot-matrix-registration-bot.md) | [moanos/matrix-registration-bot](https://hub.docker.com/r/moanos/matrix-registration-bot/) | ❌ | Bot for invitations by creating and managing registration tokens | | |||
| | [mautrix-facebook](configuring-playbook-bridge-mautrix-facebook.md) | [mautrix/facebook](https://mau.dev/mautrix/facebook/container_registry) | ❌ | Bridge to [Facebook](https://facebook.com/) | | |||
| | [mautrix-instagram](configuring-playbook-bridge-mautrix-instagram.md) | [mautrix/instagram](https://mau.dev/mautrix/instagram/container_registry) | ❌ | Bridge to [Instagram](https://instagram.com/) | | |||
| | [mx-puppet-discord](configuring-playbook-bridge-mx-puppet-discord.md) | [mx-puppet/discord/mx-puppet-discord](https://gitlab.com/mx-puppet/discord/mx-puppet-discord/container_registry) | ❌ | Bridge to [Discord](https://discordapp.com/) | | |||
| @@ -317,13 +317,6 @@ devture_systemd_service_manager_services_list_auto: | | |||
| 'groups': ['matrix', 'bots', 'honoroit', 'bot-honoroit'], | |||
| }] if matrix_bot_honoroit_enabled else []) | |||
| + | |||
| ([{ | |||
| 'name': 'matrix-bot-matrix-registration-bot.service', | |||
| 'priority': 2200, | |||
| 'restart_necessary': (matrix_bot_matrix_registration_bot_restart_necessary | bool), | |||
| 'groups': ['matrix', 'bots', 'registration-bot', 'bot-matrix-registration-bot'], | |||
| }] if matrix_bot_matrix_registration_bot_enabled else []) | |||
| + | |||
| ([{ | |||
| 'name': 'matrix-bot-matrix-reminder-bot.service', | |||
| 'priority': 2200, | |||
| @@ -2814,42 +2807,6 @@ matrix_bot_matrix_reminder_bot_allowlist_regexes_auto: | |||
| # | |||
| ###################################################################### | |||
| ###################################################################### | |||
| # | |||
| # matrix-bot-matrix-registration-bot | |||
| # | |||
| ###################################################################### | |||
| # We don't enable bots by default. | |||
| matrix_bot_matrix_registration_bot_enabled: false | |||
| matrix_bot_matrix_registration_bot_systemd_required_services_list_auto: | | |||
| {{ | |||
| matrix_addons_homeserver_systemd_services_list | |||
| }} | |||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default }}" | |||
| matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}" | |||
| matrix_bot_matrix_registration_bot_container_network: "{{ matrix_addons_container_network }}" | |||
| matrix_bot_matrix_registration_bot_container_additional_networks_auto: |- | |||
| {{ | |||
| ([matrix_homeserver_container_network] if matrix_bot_matrix_registration_bot_container_network != matrix_homeserver_container_network else []) | |||
| }} | |||
| # Using `matrix_addons_homeserver_client_api_url` would not work here, | |||
| # because `matrix-traefik:8008` (matrix-internal-client-api) does not expose any `/_synapse` paths. | |||
| matrix_bot_matrix_registration_bot_api_base_url: "{{ matrix_homeserver_container_url }}" | |||
| ###################################################################### | |||
| # | |||
| # /matrix-bot-matrix-registration-bot | |||
| # | |||
| ###################################################################### | |||
| ###################################################################### | |||
| # | |||
| # matrix-bot-maubot | |||
| @@ -4949,10 +4906,6 @@ matrix_ketesa_config_asManagedUsers_auto: | | |||
| '^@'+(matrix_bot_honoroit_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$', | |||
| ] if matrix_bot_honoroit_enabled else []) | |||
| + | |||
| ([ | |||
| '^@'+(matrix_bot_matrix_registration_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$', | |||
| ] if matrix_bot_matrix_registration_bot_enabled else []) | |||
| + | |||
| ([ | |||
| '^@'+(matrix_bot_matrix_reminder_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$', | |||
| ] if matrix_bot_matrix_reminder_bot_enabled else []) | |||
| @@ -5712,12 +5665,6 @@ matrix_tuwunel_systemd_wanted_services_list_auto: | | |||
| matrix_user_creator_users_auto: | | |||
| {{ | |||
| ([{ | |||
| 'username': matrix_bot_matrix_registration_bot_matrix_user_id_localpart, | |||
| 'initial_password': matrix_bot_matrix_registration_bot_bot_password, | |||
| 'initial_type': 'admin', | |||
| }] if matrix_bot_matrix_registration_bot_enabled else []) | |||
| + | |||
| ([{ | |||
| 'username': matrix_bot_baibot_config_user_mxid_localpart, | |||
| 'initial_password': matrix_bot_baibot_config_user_password, | |||
| @@ -1,86 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2023 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev | |||
| # SPDX-FileCopyrightText: 2022 Erick Wibben | |||
| # SPDX-FileCopyrightText: 2022 MDAD project contributors | |||
| # SPDX-FileCopyrightText: 2022 Nikita Chernyi | |||
| # SPDX-FileCopyrightText: 2023 Samuel Meenzen | |||
| # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| # matrix-registration-bot creates and manages registration tokens for a Matrix server | |||
| # Project source code URL: https://github.com/moan0s/matrix-registration-bot | |||
| matrix_bot_matrix_registration_bot_enabled: true | |||
| matrix_bot_matrix_registration_bot_container_image_self_build: false | |||
| matrix_bot_matrix_registration_bot_container_repo: "https://github.com/moan0s/matrix-registration-bot.git" | |||
| matrix_bot_matrix_registration_bot_container_repo_version: "{{ 'main' if matrix_bot_matrix_registration_bot_version == 'latest' else ('v' + matrix_bot_matrix_registration_bot_version) }}" | |||
| matrix_bot_matrix_registration_bot_container_src_files_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/docker-src" | |||
| # renovate: datasource=docker depName=moanos/matrix-registration-bot | |||
| matrix_bot_matrix_registration_bot_version: 1.3.0 | |||
| matrix_bot_matrix_registration_bot_container_iteration: 0 | |||
| matrix_bot_matrix_registration_bot_container_tag: "{{ matrix_bot_matrix_registration_bot_version }}-{{ matrix_bot_matrix_registration_bot_container_iteration }}" | |||
| matrix_bot_matrix_registration_bot_container_image: "{{ matrix_bot_matrix_registration_bot_container_image_registry_prefix }}moanos/matrix-registration-bot:{{ matrix_bot_matrix_registration_bot_container_tag }}" | |||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_matrix_registration_bot_container_image_self_build else matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream }}" | |||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream: "{{ matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default }}" | |||
| matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default: "docker.io/" | |||
| matrix_bot_matrix_registration_bot_base_path: "{{ matrix_base_data_path }}/matrix-registration-bot" | |||
| matrix_bot_matrix_registration_bot_config_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/config" | |||
| matrix_bot_matrix_registration_bot_data_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/data" | |||
| matrix_bot_matrix_registration_bot_bot_server: "{{ matrix_homeserver_url }}" | |||
| # The bot's username. This user needs to be created manually beforehand. | |||
| # Also see `matrix_bot_matrix_registration_bot_user_password`. | |||
| matrix_bot_matrix_registration_bot_matrix_user_id_localpart: "bot.matrix-registration-bot" | |||
| matrix_bot_matrix_registration_bot_matrix_user_id: '@{{ matrix_bot_matrix_registration_bot_matrix_user_id_localpart }}:{{ matrix_domain }}' | |||
| # The bot's password (can also be used to login via a client like Element Web) | |||
| matrix_bot_matrix_registration_bot_bot_password: '' | |||
| # Optional bot command prefix | |||
| matrix_bot_matrix_registration_bot_bot_prefix: "" | |||
| # Homeserver base URL | |||
| matrix_bot_matrix_registration_bot_api_base_url: "{{ matrix_homeserver_url }}" | |||
| # Optional variable that only needs to be set if the bot account is not admin | |||
| # Needs to be a valid access token of an admin account | |||
| matrix_bot_matrix_registration_bot_api_token: '' | |||
| matrix_bot_matrix_registration_bot_device_id: "matrix-docker-ansible-deploy" | |||
| # Valid values: ERROR, INFO, DEBUG | |||
| matrix_bot_matrix_registration_bot_logging_level: INFO | |||
| matrix_bot_matrix_registration_bot_container_network: "" | |||
| matrix_bot_matrix_registration_bot_container_additional_networks: "{{ matrix_bot_matrix_registration_bot_container_additional_networks_auto + matrix_bot_matrix_registration_bot_container_additional_networks_custom }}" | |||
| matrix_bot_matrix_registration_bot_container_additional_networks_auto: [] | |||
| matrix_bot_matrix_registration_bot_container_additional_networks_custom: [] | |||
| # A list of extra arguments to pass to the container | |||
| matrix_bot_matrix_registration_bot_container_extra_arguments: [] | |||
| # List of systemd services that matrix-bot-matrix-registration-bot.service depends on | |||
| matrix_bot_matrix_registration_bot_systemd_required_services_list: "{{ matrix_bot_matrix_registration_bot_systemd_required_services_list_default + matrix_bot_matrix_registration_bot_systemd_required_services_list_auto + matrix_bot_matrix_registration_bot_systemd_required_services_list_custom }}" | |||
| matrix_bot_matrix_registration_bot_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" | |||
| matrix_bot_matrix_registration_bot_systemd_required_services_list_auto: [] | |||
| matrix_bot_matrix_registration_bot_systemd_required_services_list_custom: [] | |||
| # List of systemd services that matrix-bot-matrix-registration-bot.service wants | |||
| matrix_bot_matrix_registration_bot_systemd_wanted_services_list: [] | |||
| # matrix_bot_matrix_registration_bot_restart_necessary controls whether the service | |||
| # will be restarted (when true) or merely started (when false) by the | |||
| # systemd service manager role (when conditional restart is enabled). | |||
| # | |||
| # This value is automatically computed during installation based on whether | |||
| # any configuration files, the systemd service file, or the container image changed. | |||
| # The default of `false` means "no restart needed" — appropriate when the role's | |||
| # installation tasks haven't run (e.g., due to --tags skipping them). | |||
| matrix_bot_matrix_registration_bot_restart_necessary: false | |||
| @@ -1,16 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2023 Julian-Samuel Gebühr | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - name: Delete cache files | |||
| ansible.builtin.file: | |||
| state: "{{ item }}" | |||
| path: "{{ matrix_bot_matrix_registration_bot_data_path }}" | |||
| mode: '0750' | |||
| owner: "{{ matrix_user_name }}" | |||
| group: "{{ matrix_group_name }}" | |||
| with_items: | |||
| - absent | |||
| - directory | |||
| @@ -1,31 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2023 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 - 2023 Slavi Pantaleev | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - tags: | |||
| - setup-all | |||
| - setup-bot-matrix-registration-bot | |||
| - install-all | |||
| - install-bot-matrix-registration-bot | |||
| block: | |||
| - when: matrix_bot_matrix_registration_bot_enabled | bool | |||
| ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml" | |||
| - when: matrix_bot_matrix_registration_bot_enabled | bool | |||
| ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml" | |||
| - tags: | |||
| - setup-all | |||
| - setup-bot-matrix-registration-bot | |||
| block: | |||
| - when: not matrix_bot_matrix_registration_bot_enabled | bool | |||
| ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" | |||
| - tags: | |||
| - bot-matrix-registration-bot-clean-cache | |||
| block: | |||
| - when: matrix_bot_matrix_registration_bot_enabled | bool | |||
| ansible.builtin.include_tasks: "{{ role_path }}/tasks/clean_cache.yml" | |||
| @@ -1,86 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2023 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev | |||
| # SPDX-FileCopyrightText: 2022 Sebastian Gumprich | |||
| # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara | |||
| # SPDX-FileCopyrightText: 2024 David Mehren | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - name: Ensure matrix-registration-bot paths exist | |||
| ansible.builtin.file: | |||
| path: "{{ item.path }}" | |||
| state: directory | |||
| mode: '0750' | |||
| owner: "{{ matrix_user_name }}" | |||
| group: "{{ matrix_group_name }}" | |||
| with_items: | |||
| - {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true} | |||
| - {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true} | |||
| - {path: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}", when: "{{ matrix_bot_matrix_registration_bot_container_image_self_build }}"} | |||
| when: "item.when | bool" | |||
| - name: Ensure matrix-registration-bot configuration file created | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/config.yaml.j2" | |||
| dest: "{{ matrix_bot_matrix_registration_bot_config_path }}/config.yaml" | |||
| owner: "{{ matrix_user_name }}" | |||
| group: "{{ matrix_group_name }}" | |||
| mode: '0640' | |||
| register: matrix_bot_matrix_registration_bot_config_result | |||
| - name: Ensure matrix-registration-bot image is pulled | |||
| community.docker.docker_image_pull: | |||
| name: "{{ matrix_bot_matrix_registration_bot_container_image }}" | |||
| pull: always | |||
| when: "not matrix_bot_matrix_registration_bot_container_image_self_build | bool" | |||
| register: matrix_bot_matrix_registration_bot_container_image_pull_result | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: matrix_bot_matrix_registration_bot_container_image_pull_result is not failed | |||
| - when: matrix_bot_matrix_registration_bot_container_image_self_build | bool | |||
| block: | |||
| - name: Ensure matrix-registration-bot repository is present on self-build | |||
| ansible.builtin.git: | |||
| repo: "{{ matrix_bot_matrix_registration_bot_container_repo }}" | |||
| version: "{{ matrix_bot_matrix_registration_bot_container_repo_version }}" | |||
| dest: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}" | |||
| force: "yes" | |||
| become: true | |||
| become_user: "{{ matrix_user_name }}" | |||
| register: matrix_bot_matrix_registration_bot_git_pull_results | |||
| - name: Ensure matrix-registration-bot image is built | |||
| community.docker.docker_image_build: | |||
| name: "{{ matrix_bot_matrix_registration_bot_container_image }}" | |||
| dockerfile: Dockerfile | |||
| path: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}" | |||
| pull: true | |||
| rebuild: "{{ 'always' if matrix_bot_matrix_registration_bot_git_pull_results.changed | bool else 'never' }}" | |||
| register: matrix_bot_matrix_registration_bot_container_image_build_result | |||
| - name: Ensure matrix-registration-bot container network is created | |||
| community.general.docker_network: | |||
| enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}" | |||
| name: "{{ matrix_bot_matrix_registration_bot_container_network }}" | |||
| driver: bridge | |||
| driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}" | |||
| - name: Ensure matrix-bot-matrix-registration-bot.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| mode: '0644' | |||
| register: matrix_bot_matrix_registration_bot_systemd_service_result | |||
| - name: Determine whether matrix-registration-bot needs a restart | |||
| ansible.builtin.set_fact: | |||
| matrix_bot_matrix_registration_bot_restart_necessary: >- | |||
| {{ | |||
| matrix_bot_matrix_registration_bot_config_result.changed | default(false) | |||
| or matrix_bot_matrix_registration_bot_systemd_service_result.changed | default(false) | |||
| or matrix_bot_matrix_registration_bot_container_image_pull_result.changed | default(false) | |||
| or matrix_bot_matrix_registration_bot_container_image_build_result.changed | default(false) | |||
| }} | |||
| @@ -1,31 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 Sebastian Gumprich | |||
| # SPDX-FileCopyrightText: 2022 Slavi Pantaleev | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - name: Check existence of matrix-matrix-registration-bot service | |||
| ansible.builtin.stat: | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| register: matrix_bot_matrix_registration_bot_service_stat | |||
| - when: matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool | |||
| block: | |||
| - name: Ensure matrix-matrix-registration-bot is stopped | |||
| ansible.builtin.service: | |||
| name: matrix-bot-matrix-registration-bot | |||
| state: stopped | |||
| enabled: false | |||
| daemon_reload: true | |||
| - name: Ensure matrix-bot-matrix-registration-bot.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| state: absent | |||
| - name: Ensure Matrix matrix-registration-bot paths don't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_bot_matrix_registration_bot_base_path }}" | |||
| state: absent | |||
| @@ -1,37 +0,0 @@ | |||
| # SPDX-FileCopyrightText: 2022 - 2023 Julian-Samuel Gebühr | |||
| # SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev | |||
| # SPDX-FileCopyrightText: 2025 Suguru Hirahara | |||
| # | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | |||
| --- | |||
| - name: (Deprecation) Catch and report renamed settings | |||
| ansible.builtin.fail: | |||
| msg: >- | |||
| Your configuration contains a variable, which now has a different name. | |||
| Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml). | |||
| when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0" | |||
| with_items: | |||
| - {'old': 'matrix_bot_matrix_registration_bot_bot_access_token', 'new': '<removed>'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_matrix_homeserver_url', 'new': 'matrix_bot_matrix_registration_bot_api_base_url'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image', 'new': 'matrix_bot_matrix_registration_bot_container_image'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_iteration', 'new': 'matrix_bot_matrix_registration_bot_container_iteration'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_repo', 'new': 'matrix_bot_matrix_registration_bot_container_repo'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_repo_version', 'new': 'matrix_bot_matrix_registration_bot_container_repo_version'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_src_files_path', 'new': 'matrix_bot_matrix_registration_bot_container_src_files_path'} | |||
| - {'old': 'matrix_bot_matrix_registration_bot_docker_tag', 'new': 'matrix_bot_matrix_registration_bot_container_tag'} | |||
| - name: Fail if required settings not defined | |||
| ansible.builtin.fail: | |||
| msg: >- | |||
| You need to define a required configuration setting (`{{ item }}`). | |||
| when: "lookup('vars', item, default='') == ''" | |||
| with_items: | |||
| - "matrix_bot_matrix_registration_bot_bot_password" | |||
| - "matrix_bot_matrix_registration_bot_api_base_url" | |||
| @@ -1,24 +0,0 @@ | |||
| {# | |||
| SPDX-FileCopyrightText: 2022 - 2023 Julian-Samuel Gebühr | |||
| SPDX-FileCopyrightText: 2022 Slavi Pantaleev | |||
| SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara | |||
| SPDX-License-Identifier: AGPL-3.0-or-later | |||
| #} | |||
| bot: | |||
| server: {{ matrix_bot_matrix_registration_bot_bot_server|to_json }} | |||
| username: {{ matrix_bot_matrix_registration_bot_matrix_user_id_localpart|to_json }} | |||
| password: {{ matrix_bot_matrix_registration_bot_bot_password|to_json }} | |||
| prefix: {{ matrix_bot_matrix_registration_bot_bot_prefix|to_json }} | |||
| api: | |||
| # API endpoint of the registration tokens | |||
| base_url: {{ matrix_bot_matrix_registration_bot_api_base_url|to_json }} | |||
| {% if matrix_bot_matrix_registration_bot_api_token | length > 0 %} | |||
| # Access token of an administrator on the server | |||
| token: {{ matrix_bot_matrix_registration_bot_api_token|to_json }} | |||
| {% endif %} | |||
| logging: | |||
| level: {{ matrix_bot_matrix_registration_bot_logging_level|to_json }} | |||
| @@ -1,45 +0,0 @@ | |||
| #jinja2: lstrip_blocks: True | |||
| [Unit] | |||
| Description=Matrix registration bot | |||
| {% for service in matrix_bot_matrix_registration_bot_systemd_required_services_list %} | |||
| Requires={{ service }} | |||
| After={{ service }} | |||
| {% endfor %} | |||
| {% for service in matrix_bot_matrix_registration_bot_systemd_wanted_services_list %} | |||
| Wants={{ service }} | |||
| {% endfor %} | |||
| DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ | |||
| --rm \ | |||
| --name=matrix-bot-matrix-registration-bot \ | |||
| --log-driver=none \ | |||
| --cap-drop=ALL \ | |||
| -e "CONFIG_PATH=/config/config.yaml" \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --read-only \ | |||
| --mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \ | |||
| --mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \ | |||
| --network={{ matrix_bot_matrix_registration_bot_container_network }} \ | |||
| {{ matrix_bot_matrix_registration_bot_container_image }} | |||
| {% for network in matrix_bot_matrix_registration_bot_container_additional_networks %} | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-matrix-registration-bot | |||
| {% endfor %} | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-bot-matrix-registration-bot | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-matrix-registration-bot | |||
| [Install] | |||
| WantedBy=multi-user.target | |||
| @@ -1,6 +0,0 @@ | |||
| SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev | |||
| SPDX-FileCopyrightText: 2022 Erick Wibben | |||
| SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr | |||
| SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara | |||
| SPDX-License-Identifier: AGPL-3.0-or-later | |||
| @@ -711,6 +711,18 @@ | |||
| The following variables in your configuration need to be renamed: {{ lookup('ansible.builtin.varnames', '^matrix_dynamic_dns_.+', wantlist=True) | join(', ') }} | |||
| when: "lookup('ansible.builtin.varnames', '^matrix_dynamic_dns_.+', wantlist=True) | length > 0" | |||
| - name: (Deprecation) Catch and report matrix-registration-bot variables | |||
| ansible.builtin.fail: | |||
| msg: |- | |||
| matrix-registration-bot was completely removed from the playbook in June 2026. | |||
| Please remove all `matrix_bot_matrix_registration_bot_*` variables from your configuration file (vars.yml). | |||
| You may also wish to uninstall the component manually. See `docs/configuring-playbook-bot-matrix-registration-bot.md` for more information. | |||
| The following variables in your configuration need to be removed: {{ lookup('ansible.builtin.varnames', '^matrix_bot_matrix_registration_bot_.+', wantlist=True) | join(', ') }} | |||
| when: "lookup('ansible.builtin.varnames', '^matrix_bot_matrix_registration_bot_.+', wantlist=True) | length > 0" | |||
| - name: (Deprecation) Catch and report matrix-ldap-registration-proxy variables | |||
| ansible.builtin.fail: | |||
| msg: |- | |||
| @@ -80,7 +80,6 @@ | |||
| - custom/matrix-bridge-hookshot | |||
| - custom/matrix-bridge-meshtastic-relay | |||
| - custom/matrix-bot-matrix-reminder-bot | |||
| - custom/matrix-bot-matrix-registration-bot | |||
| - custom/matrix-bot-maubot | |||
| - custom/matrix-bot-buscarron | |||
| - custom/matrix-bot-baibot | |||