Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

202 lignes
9.8 KiB

  1. # SPDX-FileCopyrightText: 2025 - 2026 luschmar
  2. # SPDX-FileCopyrightText: 2026 Slavi Pantaleev
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. # matrix-meshtastic-relay is a Matrix <-> Meshtastic bridge.
  7. # Project source code URL: https://github.com/jeremiah-k/meshtastic-matrix-relay
  8. matrix_meshtastic_relay_enabled: true
  9. # renovate: datasource=docker depName=jeremiah-k/mmrelay packageName=ghcr.io/jeremiah-k/mmrelay
  10. matrix_meshtastic_relay_version: 1.3.7
  11. matrix_meshtastic_relay_container_image: "{{ matrix_meshtastic_relay_container_image_registry_prefix }}jeremiah-k/mmrelay:{{ matrix_meshtastic_relay_version }}"
  12. matrix_meshtastic_relay_container_image_registry_prefix: "{{ matrix_meshtastic_relay_container_image_registry_prefix_upstream }}"
  13. matrix_meshtastic_relay_container_image_registry_prefix_upstream: "{{ matrix_meshtastic_relay_container_image_registry_prefix_upstream_default }}"
  14. matrix_meshtastic_relay_container_image_registry_prefix_upstream_default: "ghcr.io/"
  15. matrix_meshtastic_relay_base_path: "{{ matrix_base_data_path }}/meshtastic-relay"
  16. # Holds the Ansible-managed `config.yaml`. Mounted read-only at `/config` in the
  17. # container; mmrelay is pointed at `/config/config.yaml` via the `--config` CLI flag.
  18. matrix_meshtastic_relay_config_path: "{{ matrix_meshtastic_relay_base_path }}/config"
  19. # Runtime data directory. Mounted read-write at `/data` (MMRELAY_HOME) in the container.
  20. # mmrelay auto-creates `database/`, `logs/`, `matrix/` (credentials + E2EE store)
  21. # and `plugins/` subdirectories underneath as needed.
  22. matrix_meshtastic_relay_data_path: "{{ matrix_meshtastic_relay_base_path }}/data"
  23. matrix_meshtastic_relay_container_network: ""
  24. matrix_meshtastic_relay_container_additional_networks: "{{ matrix_meshtastic_relay_container_additional_networks_auto + matrix_meshtastic_relay_container_additional_networks_custom }}"
  25. matrix_meshtastic_relay_container_additional_networks_auto: []
  26. matrix_meshtastic_relay_container_additional_networks_custom: []
  27. # A list of extra arguments to pass to the container
  28. matrix_meshtastic_relay_container_extra_arguments: []
  29. # List of systemd services that matrix-meshtastic-relay.service depends on.
  30. matrix_meshtastic_relay_systemd_required_services_list: "{{ matrix_meshtastic_relay_systemd_required_services_list_default + matrix_meshtastic_relay_systemd_required_services_list_auto + matrix_meshtastic_relay_systemd_required_services_list_custom }}"
  31. matrix_meshtastic_relay_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  32. matrix_meshtastic_relay_systemd_required_services_list_auto: []
  33. matrix_meshtastic_relay_systemd_required_services_list_custom: []
  34. # List of systemd services that matrix-meshtastic-relay.service wants
  35. matrix_meshtastic_relay_systemd_wanted_services_list: []
  36. # Hostname of the Matrix homeserver the bot connects to.
  37. matrix_meshtastic_relay_matrix_host: ""
  38. # URL of the Matrix homeserver the bot connects to.
  39. matrix_meshtastic_relay_matrix_homeserver_url: "https://{{ matrix_meshtastic_relay_matrix_host }}"
  40. # Fully-qualified Matrix ID of the bot user.
  41. matrix_meshtastic_relay_matrix_bot_user_id: "@meshtasticbot:{{ matrix_meshtastic_relay_matrix_host }}"
  42. # Password for the bot's Matrix account.
  43. # On first startup, mmrelay uses this to log in and persist credentials (including E2EE
  44. # material) under `{{ matrix_meshtastic_relay_data_path }}/matrix/` on the host. After
  45. # that, the password can (and should) be cleared from configuration.
  46. matrix_meshtastic_relay_matrix_bot_password: ""
  47. # Controls whether End-to-End Encryption is enabled.
  48. # Requires password-based login on first start so that mmrelay can create `credentials.json`.
  49. matrix_meshtastic_relay_e2ee_enabled: true
  50. # Connection type to the Meshtastic device. One of: "tcp", "serial", "ble".
  51. matrix_meshtastic_relay_connection_type: ""
  52. # For `tcp` connection type: hostname/IP of the Meshtastic device to connect to.
  53. matrix_meshtastic_relay_tcp_host: "meshtastic.local"
  54. # For `serial` connection type: path of the serial device to connect to.
  55. # This device is passed through to the container. The host must have it available.
  56. matrix_meshtastic_relay_serial_port: "/dev/ttyUSB0"
  57. # For `ble` connection type: BLE MAC address of the Meshtastic device to connect to.
  58. # BLE requires `--network=host` and a DBus bind-mount (see the systemd service template).
  59. matrix_meshtastic_relay_ble_address: "AA:BB:CC:DD:EE:FF"
  60. # Display name of the Meshtastic network.
  61. matrix_meshtastic_relay_meshnet_name: "MediumFast"
  62. # Whether relaying from Matrix to Meshtastic is enabled.
  63. matrix_meshtastic_relay_meshtastic_broadcast_enabled: true
  64. # Matrix rooms to bridge to Meshtastic channels.
  65. # Each entry should have an `id` (Matrix room alias or room ID) and a `meshtastic_channel`.
  66. matrix_meshtastic_relay_matrix_rooms_list:
  67. - id: "#meshtastic:{{ matrix_meshtastic_relay_matrix_host }}"
  68. meshtastic_channel: "0"
  69. # Whether plugins should only respond when the bot is explicitly mentioned.
  70. matrix_meshtastic_relay_plugin_global_require_bot_mention: true
  71. # Enabled built-in ("core") plugins.
  72. # See: https://github.com/jeremiah-k/meshtastic-matrix-relay/wiki/Core-Plugins
  73. matrix_meshtastic_relay_plugins_ping_enabled: true
  74. matrix_meshtastic_relay_plugins_health_enabled: true
  75. matrix_meshtastic_relay_plugins_weather_enabled: true
  76. matrix_meshtastic_relay_plugins_weather_units: metric
  77. matrix_meshtastic_relay_plugins_telemetry_enabled: true
  78. matrix_meshtastic_relay_plugins_map_enabled: true
  79. matrix_meshtastic_relay_plugins_nodes_enabled: true
  80. # Default configuration passed to the bridge via config.yaml.
  81. # See `../templates/config.yaml.j2` for what's rendered.
  82. # Use `matrix_meshtastic_relay_configuration_extension_yaml` to override
  83. # specific values or add/remove keys without having to maintain a full copy here.
  84. matrix_meshtastic_relay_configuration_default:
  85. matrix:
  86. homeserver: "{{ matrix_meshtastic_relay_matrix_homeserver_url }}"
  87. password: "{{ matrix_meshtastic_relay_matrix_bot_password }}"
  88. bot_user_id: "{{ matrix_meshtastic_relay_matrix_bot_user_id }}"
  89. e2ee:
  90. enabled: "{{ matrix_meshtastic_relay_e2ee_enabled }}"
  91. matrix_rooms: "{{ matrix_meshtastic_relay_matrix_rooms_list }}"
  92. meshtastic: "{{ matrix_meshtastic_relay_meshtastic_configuration }}"
  93. logging:
  94. level: info
  95. log_to_file: false
  96. database:
  97. enable_wal: true
  98. busy_timeout_ms: 5000
  99. pragmas:
  100. synchronous: NORMAL
  101. temp_store: MEMORY
  102. msg_map:
  103. msgs_to_keep: 500
  104. wipe_on_restart: true
  105. plugins:
  106. require_bot_mention: "{{ matrix_meshtastic_relay_plugin_global_require_bot_mention }}"
  107. ping:
  108. active: "{{ matrix_meshtastic_relay_plugins_ping_enabled }}"
  109. health:
  110. active: "{{ matrix_meshtastic_relay_plugins_health_enabled }}"
  111. weather:
  112. active: "{{ matrix_meshtastic_relay_plugins_weather_enabled }}"
  113. units: "{{ matrix_meshtastic_relay_plugins_weather_units }}"
  114. telemetry:
  115. active: "{{ matrix_meshtastic_relay_plugins_telemetry_enabled }}"
  116. map:
  117. active: "{{ matrix_meshtastic_relay_plugins_map_enabled }}"
  118. nodes:
  119. active: "{{ matrix_meshtastic_relay_plugins_nodes_enabled }}"
  120. # Connection-type-specific `meshtastic` configuration block used by
  121. # `matrix_meshtastic_relay_configuration_default`.
  122. matrix_meshtastic_relay_meshtastic_configuration: |
  123. {{
  124. (
  125. {'connection_type': 'tcp', 'host': matrix_meshtastic_relay_tcp_host}
  126. if matrix_meshtastic_relay_connection_type == 'tcp' else
  127. (
  128. {'connection_type': 'serial', 'serial_port': matrix_meshtastic_relay_serial_port}
  129. if matrix_meshtastic_relay_connection_type == 'serial' else
  130. (
  131. {'connection_type': 'ble', 'ble_address': matrix_meshtastic_relay_ble_address}
  132. if matrix_meshtastic_relay_connection_type == 'ble' else {}
  133. )
  134. )
  135. ) | combine({
  136. 'meshnet_name': matrix_meshtastic_relay_meshnet_name,
  137. 'broadcast_enabled': matrix_meshtastic_relay_meshtastic_broadcast_enabled,
  138. 'message_interactions': {
  139. 'reactions': false,
  140. 'replies': false,
  141. },
  142. })
  143. }}
  144. # Holds additional configuration values that get merged into the default
  145. # configuration (see `matrix_meshtastic_relay_configuration_default`).
  146. #
  147. # If you need something more special, you can take full control by changing
  148. # `matrix_meshtastic_relay_configuration` directly.
  149. matrix_meshtastic_relay_configuration_extension_yaml: |
  150. # Your custom YAML configuration goes here.
  151. # This configuration extends the default starting configuration (`matrix_meshtastic_relay_configuration_default`).
  152. #
  153. # You can override individual variables from the default configuration, or introduce new ones.
  154. #
  155. # If you need something more special, you can take full control by
  156. # redefining `matrix_meshtastic_relay_configuration` directly.
  157. matrix_meshtastic_relay_configuration_extension: "{{ matrix_meshtastic_relay_configuration_extension_yaml | from_yaml if matrix_meshtastic_relay_configuration_extension_yaml | from_yaml is mapping else {} }}"
  158. # Holds the final configuration rendered to `config.yaml`.
  159. # Normally, you don't need to change this variable — use
  160. # `matrix_meshtastic_relay_configuration_extension_yaml` instead.
  161. matrix_meshtastic_relay_configuration: "{{ matrix_meshtastic_relay_configuration_default | combine(matrix_meshtastic_relay_configuration_extension, recursive=True) }}"
  162. # matrix_meshtastic_relay_restart_necessary controls whether the service
  163. # will be restarted (when true) or merely started (when false) by the
  164. # systemd service manager role (when conditional restart is enabled).
  165. #
  166. # This value is automatically computed during installation based on whether
  167. # any configuration files, the systemd service file, or the container image changed.
  168. # The default of `false` means "no restart needed" — appropriate when the role's
  169. # installation tasks haven't run (e.g., due to --tags skipping them).
  170. matrix_meshtastic_relay_restart_necessary: false