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.
 
 

160 righe
8.2 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. matrix_mautrix_whatsapp_version: v0.8.3
  9. # See: https://mau.dev/mautrix/whatsapp/container_registry
  10. matrix_mautrix_whatsapp_docker_image: "{{ matrix_mautrix_whatsapp_docker_image_name_prefix }}mautrix/whatsapp:{{ matrix_mautrix_whatsapp_version }}"
  11. matrix_mautrix_whatsapp_docker_image_name_prefix: "{{ 'localhost/' if matrix_mautrix_whatsapp_container_image_self_build else 'dock.mau.dev/' }}"
  12. matrix_mautrix_whatsapp_docker_image_force_pull: "{{ matrix_mautrix_whatsapp_docker_image.endswith(':latest') }}"
  13. matrix_mautrix_whatsapp_base_path: "{{ matrix_base_data_path }}/mautrix-whatsapp"
  14. matrix_mautrix_whatsapp_config_path: "{{ matrix_mautrix_whatsapp_base_path }}/config"
  15. matrix_mautrix_whatsapp_data_path: "{{ matrix_mautrix_whatsapp_base_path }}/data"
  16. matrix_mautrix_whatsapp_docker_src_files_path: "{{ matrix_mautrix_whatsapp_base_path }}/docker-src"
  17. matrix_mautrix_whatsapp_homeserver_address: "{{ matrix_homeserver_container_url }}"
  18. matrix_mautrix_whatsapp_homeserver_domain: "{{ matrix_domain }}"
  19. matrix_mautrix_whatsapp_appservice_address: "http://matrix-mautrix-whatsapp:8080"
  20. matrix_mautrix_whatsapp_command_prefix: "!wa"
  21. # A list of extra arguments to pass to the container
  22. matrix_mautrix_whatsapp_container_extra_arguments: []
  23. # List of systemd services that matrix-mautrix-whatsapp.service depends on.
  24. matrix_mautrix_whatsapp_systemd_required_services_list: ['docker.service']
  25. # List of systemd services that matrix-mautrix-whatsapp.service wants
  26. matrix_mautrix_whatsapp_systemd_wanted_services_list: []
  27. matrix_mautrix_whatsapp_appservice_token: ''
  28. matrix_mautrix_whatsapp_homeserver_token: ''
  29. matrix_mautrix_whatsapp_appservice_bot_username: whatsappbot
  30. # Minimum severity of journal log messages.
  31. # Options: debug, info, warn, error, fatal
  32. matrix_mautrix_whatsapp_logging_level: 'warn'
  33. # Whether or not created rooms should have federation enabled.
  34. # If false, created portal rooms will never be federated.
  35. matrix_mautrix_whatsapp_federate_rooms: true
  36. # Whether or not metrics endpoint should be enabled.
  37. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  38. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_whatsapp_metrics_proxying_enabled`.
  39. matrix_mautrix_whatsapp_metrics_enabled: false
  40. # Controls whether metrics should be proxied (exposed) on `matrix.DOMAIN/metrics/mautrix-whatsapp`.
  41. # This will only work take effect if `matrix_nginx_proxy_proxy_matrix_metrics_enabled: true`.
  42. # See the `matrix-nginx-proxy` role for details about enabling `matrix_nginx_proxy_proxy_matrix_metrics_enabled`.
  43. matrix_mautrix_whatsapp_metrics_proxying_enabled: false
  44. # Database-related configuration fields.
  45. #
  46. # To use SQLite, stick to these defaults.
  47. #
  48. # To use Postgres:
  49. # - change the engine (`matrix_mautrix_whatsapp_database_engine: 'postgres'`)
  50. # - adjust your database credentials via the `matrix_mautrix_whatsapp_database_*` variables
  51. matrix_mautrix_whatsapp_database_engine: 'sqlite'
  52. matrix_mautrix_whatsapp_sqlite_database_path_local: "{{ matrix_mautrix_whatsapp_data_path }}/mautrix-whatsapp.db"
  53. matrix_mautrix_whatsapp_sqlite_database_path_in_container: "/data/mautrix-whatsapp.db"
  54. matrix_mautrix_whatsapp_database_username: 'matrix_mautrix_whatsapp'
  55. matrix_mautrix_whatsapp_database_password: 'some-password'
  56. matrix_mautrix_whatsapp_database_hostname: ''
  57. matrix_mautrix_whatsapp_database_port: 5432
  58. matrix_mautrix_whatsapp_database_name: 'matrix_mautrix_whatsapp'
  59. 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=disable'
  60. matrix_mautrix_whatsapp_appservice_database_type: "{{
  61. {
  62. 'sqlite': 'sqlite3',
  63. 'postgres':'postgres',
  64. }[matrix_mautrix_whatsapp_database_engine]
  65. }}"
  66. matrix_mautrix_whatsapp_appservice_database_uri: "{{
  67. {
  68. 'sqlite': matrix_mautrix_whatsapp_sqlite_database_path_in_container,
  69. 'postgres': matrix_mautrix_whatsapp_database_connection_string,
  70. }[matrix_mautrix_whatsapp_database_engine]
  71. }}"
  72. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  73. matrix_mautrix_whatsapp_login_shared_secret: ''
  74. matrix_mautrix_whatsapp_bridge_login_shared_secret_map:
  75. "{{ {matrix_mautrix_whatsapp_homeserver_domain: matrix_mautrix_whatsapp_login_shared_secret} if matrix_mautrix_whatsapp_login_shared_secret else {} }}"
  76. # Enable End-to-bridge encryption
  77. matrix_mautrix_whatsapp_bridge_encryption_allow: false
  78. matrix_mautrix_whatsapp_bridge_encryption_default: "{{ matrix_mautrix_whatsapp_bridge_encryption_allow }}"
  79. matrix_mautrix_whatsapp_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_whatsapp_bridge_encryption_allow }}"
  80. matrix_mautrix_whatsapp_bridge_personal_filtering_spaces: true
  81. matrix_mautrix_whatsapp_bridge_mute_bridging: true
  82. matrix_mautrix_whatsapp_bridge_enable_status_broadcast: false
  83. matrix_mautrix_whatsapp_bridge_allow_user_invite: true
  84. matrix_mautrix_whatsapp_bridge_permissions: |
  85. {{
  86. {matrix_mautrix_whatsapp_homeserver_domain: 'user'}
  87. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  88. }}
  89. # Enable bridge relay functionality
  90. matrix_mautrix_whatsapp_bridge_relay_enabled: false
  91. # Only allow admins on this home server to set themselves as a relay user
  92. matrix_mautrix_whatsapp_bridge_relay_admin_only: true
  93. # Default mautrix-whatsapp configuration template which covers the generic use case.
  94. # You can customize it by controlling the various variables inside it.
  95. #
  96. # For a more advanced customization, you can extend the default (see `matrix_mautrix_whatsapp_configuration_extension_yaml`)
  97. # or completely replace this variable with your own template.
  98. matrix_mautrix_whatsapp_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  99. matrix_mautrix_whatsapp_configuration_extension_yaml: |
  100. # Your custom YAML configuration goes here.
  101. # This configuration extends the default starting configuration (`matrix_mautrix_whatsapp_configuration_yaml`).
  102. #
  103. # You can override individual variables from the default configuration, or introduce new ones.
  104. #
  105. # If you need something more special, you can take full control by
  106. # completely redefining `matrix_mautrix_whatsapp_configuration_yaml`.
  107. 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 {} }}"
  108. # Holds the final configuration (a combination of the default and its extension).
  109. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_whatsapp_configuration_yaml`.
  110. matrix_mautrix_whatsapp_configuration: "{{ matrix_mautrix_whatsapp_configuration_yaml | from_yaml | combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}"
  111. matrix_mautrix_whatsapp_registration_yaml: |
  112. id: whatsapp
  113. url: {{ matrix_mautrix_whatsapp_appservice_address }}
  114. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  115. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  116. # See https://github.com/mautrix/signal/issues/43
  117. sender_localpart: _bot_{{ matrix_mautrix_whatsapp_appservice_bot_username }}
  118. rate_limited: false
  119. namespaces:
  120. users:
  121. - regex: '^@whatsapp_[0-9]+:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$'
  122. exclusive: true
  123. - exclusive: true
  124. regex: '^@{{ matrix_mautrix_whatsapp_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$'
  125. de.sorunome.msc2409.push_ephemeral: true
  126. matrix_mautrix_whatsapp_registration: "{{ matrix_mautrix_whatsapp_registration_yaml | from_yaml }}"