Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

148 line
8.6 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2019 Daniel Løvbrøtte Olsen
  3. # SPDX-FileCopyrightText: 2020 John Goerzen
  4. # SPDX-FileCopyrightText: 2021 - 2023 MDAD project contributors
  5. # SPDX-FileCopyrightText: 2021 Aaron Raimist
  6. # SPDX-FileCopyrightText: 2021 Ahmad Haghighi
  7. # SPDX-FileCopyrightText: 2022 Jim Myhrberg
  8. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  9. # SPDX-FileCopyrightText: 2022 Nikita Chernyi
  10. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  11. #
  12. # SPDX-License-Identifier: AGPL-3.0-or-later
  13. ---
  14. # matrix-appservice-discord is a Matrix <-> Discord bridge
  15. # Project source code URL: https://github.com/matrix-org/matrix-appservice-discord
  16. matrix_bridge_appservice_discord_enabled: false
  17. # renovate: datasource=docker depName=ghcr.io/matrix-org/matrix-appservice-discord
  18. matrix_bridge_appservice_discord_version: v4.0.0
  19. matrix_bridge_appservice_discord_container_image: "{{ matrix_bridge_appservice_discord_container_image_registry_prefix }}matrix-org/matrix-appservice-discord:{{ matrix_bridge_appservice_discord_version }}"
  20. matrix_bridge_appservice_discord_container_image_registry_prefix: "{{ matrix_bridge_appservice_discord_container_image_registry_prefix_upstream }}"
  21. matrix_bridge_appservice_discord_container_image_registry_prefix_upstream: "{{ matrix_bridge_appservice_discord_container_image_registry_prefix_upstream_default }}"
  22. matrix_bridge_appservice_discord_container_image_registry_prefix_upstream_default: "ghcr.io/"
  23. matrix_bridge_appservice_discord_base_path: "{{ matrix_base_data_path }}/appservice-discord"
  24. matrix_bridge_appservice_discord_config_path: "{{ matrix_base_data_path }}/appservice-discord/config"
  25. matrix_bridge_appservice_discord_data_path: "{{ matrix_base_data_path }}/appservice-discord/data"
  26. # Get your own keys at https://discordapp.com/developers/applications/me/create
  27. matrix_bridge_appservice_discord_client_id: ''
  28. matrix_bridge_appservice_discord_bot_token: ''
  29. matrix_bridge_appservice_discord_appservice_token: ''
  30. matrix_bridge_appservice_discord_homeserver_token: ''
  31. matrix_bridge_appservice_discord_homeserver_domain: "{{ matrix_domain }}"
  32. # Controls whether the matrix-appservice-discord container exposes its HTTP port (tcp/9005 in the container).
  33. #
  34. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9005"), or empty string to not expose.
  35. matrix_bridge_appservice_discord_container_http_host_bind_port: ''
  36. matrix_bridge_appservice_discord_container_network: ""
  37. matrix_bridge_appservice_discord_container_additional_networks: "{{ matrix_bridge_appservice_discord_container_additional_networks_auto + matrix_bridge_appservice_discord_container_additional_networks_custom }}"
  38. matrix_bridge_appservice_discord_container_additional_networks_auto: []
  39. matrix_bridge_appservice_discord_container_additional_networks_custom: []
  40. # A list of extra arguments to pass to the container
  41. matrix_bridge_appservice_discord_container_extra_arguments: []
  42. # List of systemd services that matrix-appservice-discord.service depends on.
  43. matrix_bridge_appservice_discord_systemd_required_services_list: "{{ matrix_bridge_appservice_discord_systemd_required_services_list_default + matrix_bridge_appservice_discord_systemd_required_services_list_auto + matrix_bridge_appservice_discord_systemd_required_services_list_custom }}"
  44. matrix_bridge_appservice_discord_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  45. matrix_bridge_appservice_discord_systemd_required_services_list_auto: []
  46. matrix_bridge_appservice_discord_systemd_required_services_list_custom: []
  47. # List of systemd services that matrix-appservice-discord.service wants
  48. matrix_bridge_appservice_discord_systemd_wanted_services_list: []
  49. matrix_bridge_appservice_discord_appservice_url: 'http://matrix-appservice-discord:9005'
  50. matrix_bridge_appservice_discord_bridge_domain: "{{ matrix_domain }}"
  51. # As of right now, the homeserver URL must be a public URL. See below.
  52. matrix_bridge_appservice_discord_bridge_homeserverUrl: "{{ matrix_homeserver_url }}" # noqa var-naming
  53. matrix_bridge_appservice_discord_bridge_disablePresence: false # noqa var-naming
  54. matrix_bridge_appservice_discord_bridge_enableSelfServiceBridging: false # noqa var-naming
  55. matrix_bridge_appservice_discord_bridge_disablePortalBridging: false # noqa var-naming
  56. # Database-related configuration fields.
  57. #
  58. # To use SQLite, stick to these defaults.
  59. #
  60. # To use Postgres:
  61. # - change the engine (`matrix_bridge_appservice_discord_database_engine: 'postgres'`)
  62. # - adjust your database credentials via the `matrix_bridge_appservice_discord_database_*` variables
  63. matrix_bridge_appservice_discord_database_engine: 'sqlite'
  64. matrix_bridge_appservice_discord_sqlite_database_path_local: "{{ matrix_bridge_appservice_discord_data_path }}/discord.db"
  65. matrix_bridge_appservice_discord_sqlite_database_path_in_container: "/data/discord.db"
  66. matrix_bridge_appservice_discord_database_username: 'matrix_appservice_discord'
  67. matrix_bridge_appservice_discord_database_password: 'some-password'
  68. matrix_bridge_appservice_discord_database_hostname: ''
  69. matrix_bridge_appservice_discord_database_port: 5432
  70. matrix_bridge_appservice_discord_database_name: 'matrix_appservice_discord'
  71. # These 2 variables are what actually ends up in the bridge configuration.
  72. # It's best if you don't change them directly, but rather redefine the sub-variables that constitute them.
  73. matrix_bridge_appservice_discord_database_filename: "{{ matrix_bridge_appservice_discord_sqlite_database_path_in_container }}"
  74. matrix_bridge_appservice_discord_database_connString: 'postgresql://{{ matrix_bridge_appservice_discord_database_username }}:{{ matrix_bridge_appservice_discord_database_password }}@{{ matrix_bridge_appservice_discord_database_hostname }}:{{ matrix_bridge_appservice_discord_database_port }}/{{ matrix_bridge_appservice_discord_database_name }}' # noqa var-naming
  75. # Tells whether the bot should make use of "Privileged Gateway Intents".
  76. #
  77. # Enabling this means that you need to enable it for the bot (Discord application) as well,
  78. # by triggering all Intent checkboxes on a page like this: `https://discord.com/developers/applications/694448564151123988/bot`
  79. #
  80. # Learn more: https://gist.github.com/advaith1/e69bcc1cdd6d0087322734451f15aa2f
  81. matrix_bridge_appservice_discord_auth_usePrivilegedIntents: false # noqa var-naming
  82. matrix_bridge_appservice_discord_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  83. matrix_bridge_appservice_discord_configuration_extension_yaml: |
  84. # Your custom YAML configuration goes here.
  85. # This configuration extends the default starting configuration (`matrix_bridge_appservice_discord_configuration_yaml`).
  86. #
  87. # You can override individual variables from the default configuration, or introduce new ones.
  88. #
  89. # If you need something more special, you can take full control by
  90. # completely redefining `matrix_bridge_appservice_discord_configuration_yaml`.
  91. matrix_bridge_appservice_discord_configuration_extension: "{{ matrix_bridge_appservice_discord_configuration_extension_yaml | from_yaml if matrix_bridge_appservice_discord_configuration_extension_yaml | from_yaml is mapping else {} }}"
  92. matrix_bridge_appservice_discord_configuration: "{{ matrix_bridge_appservice_discord_configuration_yaml | from_yaml | combine(matrix_bridge_appservice_discord_configuration_extension, recursive=True) }}"
  93. matrix_bridge_appservice_discord_registration_yaml: |
  94. #jinja2: lstrip_blocks: True
  95. id: appservice-discord
  96. as_token: "{{ matrix_bridge_appservice_discord_appservice_token }}"
  97. hs_token: "{{ matrix_bridge_appservice_discord_homeserver_token }}"
  98. namespaces:
  99. users:
  100. - exclusive: true
  101. regex: '@_discord_.*:{{ matrix_bridge_appservice_discord_homeserver_domain | regex_escape }}'
  102. aliases:
  103. - exclusive: true
  104. regex: '#_discord_.*:{{ matrix_bridge_appservice_discord_homeserver_domain | regex_escape }}'
  105. url: {{ matrix_bridge_appservice_discord_appservice_url }}
  106. sender_localpart: _discord_bot
  107. rate_limited: false
  108. protocols:
  109. - discord
  110. matrix_bridge_appservice_discord_registration: "{{ matrix_bridge_appservice_discord_registration_yaml | from_yaml }}"
  111. # matrix_bridge_appservice_discord_restart_necessary controls whether the service
  112. # will be restarted (when true) or merely started (when false) by the
  113. # systemd service manager role (when conditional restart is enabled).
  114. #
  115. # This value is automatically computed during installation based on whether
  116. # any configuration files, the systemd service file, or the container image changed.
  117. # The default of `false` means "no restart needed" — appropriate when the role's
  118. # installation tasks haven't run (e.g., due to --tags skipping them).
  119. matrix_bridge_appservice_discord_restart_necessary: false