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.

155 lines
7.9 KiB

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