Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

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