Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

174 行
8.9 KiB

  1. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. # WeChat Bridge is a Matrix <-> WeChat bridge
  7. # Project source code URL: https://github.com/duo/matrix-wechat
  8. matrix_wechat_enabled: true
  9. # renovate: datasource=docker depName=lxduo/matrix-wechat
  10. matrix_wechat_version: 0.2.4
  11. matrix_wechat_container_image: "{{ matrix_wechat_container_image_registry_prefix }}lxduo/matrix-wechat:{{ matrix_wechat_version }}"
  12. matrix_wechat_container_image_registry_prefix: "{{ 'localhost/' if matrix_wechat_container_image_self_build else matrix_wechat_container_image_registry_prefix_upstream }}"
  13. matrix_wechat_container_image_registry_prefix_upstream: "{{ matrix_wechat_container_image_registry_prefix_upstream_default }}"
  14. matrix_wechat_container_image_registry_prefix_upstream_default: "docker.io/"
  15. matrix_wechat_container_image_self_build: false
  16. matrix_wechat_container_image_self_build_repo: "https://github.com/duo/matrix-wechat.git"
  17. matrix_wechat_container_image_self_build_branch: "{{ 'master' if matrix_wechat_version == 'latest' else matrix_wechat_version }}"
  18. # renovate: datasource=docker depName=lxduo/matrix-wechat-agent
  19. matrix_wechat_agent_version: 0.0.1
  20. matrix_wechat_agent_container_image: "{{ matrix_wechat_agent_container_image_registry_prefix }}lxduo/matrix-wechat-agent:{{ matrix_wechat_agent_version }}"
  21. matrix_wechat_agent_container_image_registry_prefix: "{{ 'localhost/' if matrix_wechat_agent_container_image_self_build else matrix_wechat_agent_container_image_registry_prefix_upstream }}"
  22. matrix_wechat_agent_container_image_registry_prefix_upstream: "{{ matrix_wechat_agent_container_image_registry_prefix_upstream_default }}"
  23. matrix_wechat_agent_container_image_registry_prefix_upstream_default: "docker.io/"
  24. # The agent needs to write to /home/user/.vnc.
  25. # `/home/user` is owned by `user:group` (`1000:1000`), so it needs to run with that user/group.
  26. matrix_wechat_agent_container_user_uid: 1000
  27. matrix_wechat_agent_container_user_gid: 1000
  28. matrix_wechat_agent_container_image_self_build: false
  29. matrix_wechat_agent_container_image_self_build_repo: "https://github.com/duo/matrix-wechat-agent.git"
  30. matrix_wechat_agent_container_image_self_build_branch: "{{ 'master' if matrix_wechat_agent_version == 'latest' else matrix_wechat_agent_version }}"
  31. matrix_wechat_base_path: "{{ matrix_base_data_path }}/wechat"
  32. matrix_wechat_config_path: "{{ matrix_wechat_base_path }}/config"
  33. matrix_wechat_data_path: "{{ matrix_wechat_base_path }}/data"
  34. matrix_wechat_container_src_files_path: "{{ matrix_wechat_base_path }}/container-src"
  35. matrix_wechat_agent_container_src_files_path: "{{ matrix_wechat_base_path }}/agent-container-src"
  36. matrix_wechat_homeserver_address: ""
  37. matrix_wechat_homeserver_domain: "{{ matrix_domain }}"
  38. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  39. # Requires a homeserver that supports MSC2246 (https://github.com/matrix-org/matrix-spec-proposals/pull/2246).
  40. matrix_wechat_homeserver_async_media: false
  41. matrix_wechat_appservice_address: 'http://matrix-wechat:8080'
  42. matrix_wechat_container_network: ""
  43. matrix_wechat_container_additional_networks: "{{ matrix_wechat_container_additional_networks_auto + matrix_wechat_container_additional_networks_custom }}"
  44. matrix_wechat_container_additional_networks_auto: []
  45. matrix_wechat_container_additional_networks_custom: []
  46. # A list of extra arguments to pass to the container
  47. matrix_wechat_container_extra_arguments: []
  48. # List of systemd services that matrix-wechat.service depends on.
  49. matrix_wechat_systemd_required_services_list: "{{ matrix_wechat_systemd_required_services_list_default + matrix_wechat_systemd_required_services_list_auto + matrix_wechat_systemd_required_services_list_custom }}"
  50. matrix_wechat_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  51. matrix_wechat_systemd_required_services_list_auto: []
  52. matrix_wechat_systemd_required_services_list_custom: []
  53. # List of systemd services that matrix-wechat.service wants
  54. matrix_wechat_systemd_wanted_services_list: []
  55. matrix_wechat_appservice_token: ''
  56. matrix_wechat_homeserver_token: ''
  57. matrix_wechat_appservice_bot_username: wechatbot
  58. matrix_wechat_command_prefix: "!wechat"
  59. # Whether or not created rooms should have federation enabled.
  60. # If false, created portal rooms will never be federated.
  61. matrix_wechat_federate_rooms: true
  62. # Database-related configuration fields.
  63. matrix_wechat_database_engine: 'postgres'
  64. matrix_wechat_database_username: 'matrix_wechat'
  65. matrix_wechat_database_password: 'some-password'
  66. matrix_wechat_database_hostname: ''
  67. matrix_wechat_database_port: 5432
  68. matrix_wechat_database_name: 'matrix_wechat'
  69. matrix_wechat_database_sslmode: disable
  70. matrix_wechat_database_connection_string: 'postgresql://{{ matrix_wechat_database_username }}:{{ matrix_wechat_database_password }}@{{ matrix_wechat_database_hostname }}:{{ matrix_wechat_database_port }}/{{ matrix_wechat_database_name }}?sslmode={{ matrix_wechat_database_sslmode }}'
  71. matrix_wechat_bridge_listen_secret: ''
  72. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  73. matrix_wechat_login_shared_secret: ''
  74. matrix_wechat_login_shared_secret_map:
  75. "{{ {matrix_wechat_homeserver_domain: matrix_wechat_login_shared_secret} if matrix_wechat_login_shared_secret else {} }}"
  76. # Servers to always allow double puppeting from
  77. matrix_wechat_double_puppet_server_map:
  78. "{{ matrix_wechat_homeserver_domain: matrix_wechat_homeserver_address }}"
  79. # Enable End-to-bridge encryption
  80. matrix_wechat_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  81. matrix_wechat_encryption_default: "{{ matrix_wechat_encryption_allow }}"
  82. # Minimum severity of journal log messages.
  83. # Valid values: fatal, error, warn, info, debug
  84. matrix_wechat_log_level: 'warn'
  85. matrix_wechat_permissions: |
  86. {{
  87. {matrix_wechat_homeserver_domain: 'user'}
  88. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  89. }}
  90. # Default Wechat configuration template which covers the generic use case.
  91. # You can customize it by controlling the various variables inside it.
  92. #
  93. # For a more advanced customization, you can extend the default (see `matrix_wechat_configuration_extension_yaml`)
  94. # or completely replace this variable with your own template.
  95. matrix_wechat_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  96. matrix_wechat_configuration_extension_yaml: |
  97. # Your custom YAML configuration goes here.
  98. # This configuration extends the default starting configuration (`matrix_wechat_configuration_yaml`).
  99. #
  100. # You can override individual variables from the default configuration, or introduce new ones.
  101. #
  102. # If you need something more special, you can take full control by
  103. # completely redefining `matrix_wechat_configuration_yaml`.
  104. matrix_wechat_configuration_extension: "{{ matrix_wechat_configuration_extension_yaml | from_yaml if matrix_wechat_configuration_extension_yaml | from_yaml is mapping else {} }}"
  105. # Holds the final configuration (a combination of the default and its extension).
  106. # You most likely don't need to touch this variable. Instead, see `matrix_wechat_configuration_yaml`.
  107. matrix_wechat_configuration: "{{ matrix_wechat_configuration_yaml | from_yaml | combine(matrix_wechat_configuration_extension, recursive=True) }}"
  108. matrix_wechat_registration_yaml: |
  109. id: wechat
  110. url: {{ matrix_wechat_appservice_address }}
  111. as_token: "{{ matrix_wechat_appservice_token }}"
  112. hs_token: "{{ matrix_wechat_homeserver_token }}"
  113. # See https://github.com/mautrix/signal/issues/43
  114. sender_localpart: _bot_{{ matrix_wechat_appservice_bot_username }}
  115. rate_limited: false
  116. namespaces:
  117. users:
  118. - regex: '^@_wechat_(.*):{{ matrix_wechat_homeserver_domain | regex_escape }}$'
  119. exclusive: true
  120. - exclusive: true
  121. regex: '^@{{ matrix_wechat_appservice_bot_username | regex_escape }}:{{ matrix_wechat_homeserver_domain | regex_escape }}$'
  122. de.sorunome.msc2409.push_ephemeral: true
  123. receive_ephemeral: true
  124. matrix_wechat_registration: "{{ matrix_wechat_registration_yaml | from_yaml }}"
  125. matrix_wechat_agent_service_secret: "{{ matrix_wechat_bridge_listen_secret }}"
  126. matrix_wechat_agent_configuration_yaml: "{{ lookup('template', 'templates/agent-config.yaml.j2') }}"
  127. matrix_wechat_agent_configuration: "{{ matrix_wechat_agent_configuration_yaml | from_yaml }}"
  128. # matrix_wechat_restart_necessary controls whether the service
  129. # will be restarted (when true) or merely started (when false) by the
  130. # systemd service manager role (when conditional restart is enabled).
  131. #
  132. # This value is automatically computed during installation based on whether
  133. # any configuration files, the systemd service file, or the container image changed.
  134. # The default of `false` means "no restart needed" — appropriate when the role's
  135. # installation tasks haven't run (e.g., due to --tags skipping them).
  136. matrix_wechat_restart_necessary: false