Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

203 строки
11 KiB

  1. ---
  2. # mautrix-whatsapp is a Matrix <-> Whatsapp bridge
  3. # Project source code URL: https://github.com/mautrix/whatsapp
  4. matrix_mautrix_whatsapp_enabled: true
  5. matrix_mautrix_whatsapp_container_image_self_build: false
  6. matrix_mautrix_whatsapp_container_image_self_build_repo: "https://mau.dev/mautrix/whatsapp.git"
  7. matrix_mautrix_whatsapp_container_image_self_build_branch: "{{ 'master' if matrix_mautrix_whatsapp_version == 'latest' else matrix_mautrix_whatsapp_version }}"
  8. # renovate: datasource=docker depName=dock.mau.dev/mautrix/whatsapp
  9. matrix_mautrix_whatsapp_version: v0.10.7
  10. # See: https://mau.dev/mautrix/whatsapp/container_registry
  11. matrix_mautrix_whatsapp_docker_image: "{{ matrix_mautrix_whatsapp_docker_image_name_prefix }}mautrix/whatsapp:{{ matrix_mautrix_whatsapp_version }}"
  12. matrix_mautrix_whatsapp_docker_image_name_prefix: "{{ 'localhost/' if matrix_mautrix_whatsapp_container_image_self_build else 'dock.mau.dev/' }}"
  13. matrix_mautrix_whatsapp_docker_image_force_pull: "{{ matrix_mautrix_whatsapp_docker_image.endswith(':latest') }}"
  14. matrix_mautrix_whatsapp_base_path: "{{ matrix_base_data_path }}/mautrix-whatsapp"
  15. matrix_mautrix_whatsapp_config_path: "{{ matrix_mautrix_whatsapp_base_path }}/config"
  16. matrix_mautrix_whatsapp_data_path: "{{ matrix_mautrix_whatsapp_base_path }}/data"
  17. matrix_mautrix_whatsapp_docker_src_files_path: "{{ matrix_mautrix_whatsapp_base_path }}/docker-src"
  18. matrix_mautrix_whatsapp_homeserver_address: ""
  19. matrix_mautrix_whatsapp_homeserver_domain: "{{ matrix_domain }}"
  20. matrix_mautrix_whatsapp_appservice_address: "http://matrix-mautrix-whatsapp:8080"
  21. matrix_mautrix_whatsapp_extev_polls: false
  22. matrix_mautrix_whatsapp_command_prefix: "!wa"
  23. matrix_mautrix_whatsapp_container_network: ""
  24. matrix_mautrix_whatsapp_container_additional_networks: "{{ matrix_mautrix_whatsapp_container_additional_networks_auto + matrix_mautrix_whatsapp_container_additional_networks_custom }}"
  25. matrix_mautrix_whatsapp_container_additional_networks_auto: []
  26. matrix_mautrix_whatsapp_container_additional_networks_custom: []
  27. # matrix_mautrix_whatsapp_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  28. # See `../templates/labels.j2` for details.
  29. #
  30. # To inject your own other container labels, see `matrix_mautrix_whatsapp_container_labels_additional_labels`.
  31. matrix_mautrix_whatsapp_container_labels_traefik_enabled: true
  32. matrix_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matrix_mautrix_whatsapp_container_network }}"
  33. matrix_mautrix_whatsapp_container_labels_traefik_entrypoints: web-secure
  34. matrix_mautrix_whatsapp_container_labels_traefik_tls_certResolver: default # noqa var-naming
  35. # Controls whether labels will be added that expose mautrix-whatsapp's metrics
  36. matrix_mautrix_whatsapp_container_labels_metrics_enabled: "{{ matrix_mautrix_whatsapp_metrics_enabled and matrix_mautrix_whatsapp_metrics_proxying_enabled }}"
  37. matrix_mautrix_whatsapp_container_labels_metrics_traefik_rule: "Host(`{{ matrix_mautrix_whatsapp_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_mautrix_whatsapp_metrics_proxying_path_prefix }}`)"
  38. matrix_mautrix_whatsapp_container_labels_metrics_traefik_priority: 0
  39. matrix_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints: "{{ matrix_mautrix_whatsapp_container_labels_traefik_entrypoints }}"
  40. matrix_mautrix_whatsapp_container_labels_metrics_traefik_tls: "{{ matrix_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints != 'web' }}"
  41. matrix_mautrix_whatsapp_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_mautrix_whatsapp_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  42. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled: false
  43. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  44. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users: ''
  45. # matrix_mautrix_whatsapp_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  46. # See `../templates/labels.j2` for details.
  47. #
  48. # Example:
  49. # matrix_mautrix_whatsapp_container_labels_additional_labels: |
  50. # my.label=1
  51. # another.label="here"
  52. matrix_mautrix_whatsapp_container_labels_additional_labels: ''
  53. # A list of extra arguments to pass to the container
  54. matrix_mautrix_whatsapp_container_extra_arguments: []
  55. # List of systemd services that matrix-mautrix-whatsapp.service depends on.
  56. matrix_mautrix_whatsapp_systemd_required_services_list: "{{ matrix_mautrix_whatsapp_systemd_required_services_list_default + matrix_mautrix_whatsapp_systemd_required_services_list_auto + matrix_mautrix_whatsapp_systemd_required_services_list_custom }}"
  57. matrix_mautrix_whatsapp_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  58. matrix_mautrix_whatsapp_systemd_required_services_list_auto: []
  59. matrix_mautrix_whatsapp_systemd_required_services_list_custom: []
  60. # List of systemd services that matrix-mautrix-whatsapp.service wants
  61. matrix_mautrix_whatsapp_systemd_wanted_services_list: []
  62. matrix_mautrix_whatsapp_appservice_token: ''
  63. matrix_mautrix_whatsapp_homeserver_token: ''
  64. matrix_mautrix_whatsapp_appservice_bot_username: whatsappbot
  65. # Minimum severity of journal log messages.
  66. # Options: debug, info, warn, error, fatal
  67. matrix_mautrix_whatsapp_logging_level: 'warn'
  68. # Whether or not created rooms should have federation enabled.
  69. # If false, created portal rooms will never be federated.
  70. matrix_mautrix_whatsapp_federate_rooms: true
  71. # Whether or not metrics endpoint should be enabled.
  72. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  73. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_whatsapp_metrics_proxying_enabled`.
  74. matrix_mautrix_whatsapp_metrics_enabled: false
  75. # Controls whether metrics should be proxied (exposed) on a public URL
  76. matrix_mautrix_whatsapp_metrics_proxying_enabled: false
  77. matrix_mautrix_whatsapp_metrics_proxying_hostname: ''
  78. matrix_mautrix_whatsapp_metrics_proxying_path_prefix: ''
  79. # Database-related configuration fields.
  80. #
  81. # To use SQLite, stick to these defaults.
  82. #
  83. # To use Postgres:
  84. # - change the engine (`matrix_mautrix_whatsapp_database_engine: 'postgres'`)
  85. # - adjust your database credentials via the `matrix_mautrix_whatsapp_database_*` variables
  86. matrix_mautrix_whatsapp_database_engine: 'sqlite'
  87. matrix_mautrix_whatsapp_sqlite_database_path_local: "{{ matrix_mautrix_whatsapp_data_path }}/mautrix-whatsapp.db"
  88. matrix_mautrix_whatsapp_sqlite_database_path_in_container: "/data/mautrix-whatsapp.db"
  89. matrix_mautrix_whatsapp_database_username: 'matrix_mautrix_whatsapp'
  90. matrix_mautrix_whatsapp_database_password: 'some-password'
  91. matrix_mautrix_whatsapp_database_hostname: ''
  92. matrix_mautrix_whatsapp_database_port: 5432
  93. matrix_mautrix_whatsapp_database_name: 'matrix_mautrix_whatsapp'
  94. matrix_mautrix_whatsapp_database_sslmode: disable
  95. matrix_mautrix_whatsapp_database_connection_string: 'postgresql://{{ matrix_mautrix_whatsapp_database_username }}:{{ matrix_mautrix_whatsapp_database_password }}@{{ matrix_mautrix_whatsapp_database_hostname }}:{{ matrix_mautrix_whatsapp_database_port }}/{{ matrix_mautrix_whatsapp_database_name }}?sslmode={{ matrix_mautrix_whatsapp_database_sslmode }}'
  96. matrix_mautrix_whatsapp_appservice_database_type: "{{
  97. {
  98. 'sqlite': 'sqlite3',
  99. 'postgres':'postgres',
  100. }[matrix_mautrix_whatsapp_database_engine]
  101. }}"
  102. matrix_mautrix_whatsapp_appservice_database_uri: "{{
  103. {
  104. 'sqlite': matrix_mautrix_whatsapp_sqlite_database_path_in_container,
  105. 'postgres': matrix_mautrix_whatsapp_database_connection_string,
  106. }[matrix_mautrix_whatsapp_database_engine]
  107. }}"
  108. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  109. matrix_mautrix_whatsapp_login_shared_secret: ''
  110. matrix_mautrix_whatsapp_bridge_login_shared_secret_map:
  111. "{{ {matrix_mautrix_whatsapp_homeserver_domain: matrix_mautrix_whatsapp_login_shared_secret} if matrix_mautrix_whatsapp_login_shared_secret else {} }}"
  112. # Enable End-to-bridge encryption
  113. matrix_mautrix_whatsapp_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  114. matrix_mautrix_whatsapp_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  115. matrix_mautrix_whatsapp_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_whatsapp_bridge_encryption_allow }}"
  116. matrix_mautrix_whatsapp_bridge_personal_filtering_spaces: true
  117. matrix_mautrix_whatsapp_bridge_mute_bridging: true
  118. matrix_mautrix_whatsapp_bridge_enable_status_broadcast: false
  119. matrix_mautrix_whatsapp_bridge_allow_user_invite: true
  120. matrix_mautrix_whatsapp_bridge_permissions: |
  121. {{
  122. {'*': 'relay', matrix_mautrix_whatsapp_homeserver_domain: 'user'}
  123. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  124. }}
  125. # Enable bridge relay functionality
  126. matrix_mautrix_whatsapp_bridge_relay_enabled: "{{ matrix_bridges_relay_enabled }}"
  127. # Only allow admins on this home server to set themselves as a relay user
  128. matrix_mautrix_whatsapp_bridge_relay_admin_only: true
  129. # Default mautrix-whatsapp configuration template which covers the generic use case.
  130. # You can customize it by controlling the various variables inside it.
  131. #
  132. # For a more advanced customization, you can extend the default (see `matrix_mautrix_whatsapp_configuration_extension_yaml`)
  133. # or completely replace this variable with your own template.
  134. matrix_mautrix_whatsapp_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  135. matrix_mautrix_whatsapp_configuration_extension_yaml: |
  136. # Your custom YAML configuration goes here.
  137. # This configuration extends the default starting configuration (`matrix_mautrix_whatsapp_configuration_yaml`).
  138. #
  139. # You can override individual variables from the default configuration, or introduce new ones.
  140. #
  141. # If you need something more special, you can take full control by
  142. # completely redefining `matrix_mautrix_whatsapp_configuration_yaml`.
  143. matrix_mautrix_whatsapp_configuration_extension: "{{ matrix_mautrix_whatsapp_configuration_extension_yaml | from_yaml if matrix_mautrix_whatsapp_configuration_extension_yaml | from_yaml is mapping else {} }}"
  144. # Holds the final configuration (a combination of the default and its extension).
  145. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_whatsapp_configuration_yaml`.
  146. matrix_mautrix_whatsapp_configuration: "{{ matrix_mautrix_whatsapp_configuration_yaml | from_yaml | combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}"
  147. matrix_mautrix_whatsapp_registration_yaml: |
  148. id: whatsapp
  149. url: {{ matrix_mautrix_whatsapp_appservice_address }}
  150. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  151. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  152. # See https://github.com/mautrix/signal/issues/43
  153. sender_localpart: _bot_{{ matrix_mautrix_whatsapp_appservice_bot_username }}
  154. rate_limited: false
  155. namespaces:
  156. users:
  157. - regex: '^@whatsapp_[0-9]+:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$'
  158. exclusive: true
  159. - exclusive: true
  160. regex: '^@{{ matrix_mautrix_whatsapp_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$'
  161. de.sorunome.msc2409.push_ephemeral: true
  162. matrix_mautrix_whatsapp_registration: "{{ matrix_mautrix_whatsapp_registration_yaml | from_yaml }}"