# 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
