Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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