Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

115 lignes
5.8 KiB

  1. # mautrix-whatsapp is a Matrix <-> Whatsapp bridge
  2. # See: https://github.com/tulir/mautrix-whatsapp
  3. matrix_mautrix_whatsapp_enabled: true
  4. matrix_mautrix_whatsapp_container_image_self_build_repo: "https://github.com/tulir/mautrix-whatsapp.git"
  5. matrix_mautrix_whatsapp_version: latest
  6. # See: https://mau.dev/tulir/mautrix-whatsapp/container_registry
  7. matrix_mautrix_whatsapp_docker_image: "{{ matrix_mautrix_whatsapp_docker_image_name_prefix }}tulir/mautrix-whatsapp:{{ matrix_mautrix_whatsapp_version }}"
  8. matrix_mautrix_whatsapp_docker_image_name_prefix: "{{ 'localhost/' if matrix_mautrix_whatsapp_container_image_self_build else 'dock.mau.dev/' }}"
  9. matrix_mautrix_whatsapp_docker_image_force_pull: "{{ matrix_mautrix_whatsapp_docker_image.endswith(':latest') }}"
  10. matrix_mautrix_whatsapp_base_path: "{{ matrix_base_data_path }}/mautrix-whatsapp"
  11. matrix_mautrix_whatsapp_config_path: "{{ matrix_mautrix_whatsapp_base_path }}/config"
  12. matrix_mautrix_whatsapp_data_path: "{{ matrix_mautrix_whatsapp_base_path }}/data"
  13. matrix_mautrix_whatsapp_docker_src_files_path: "{{ matrix_mautrix_whatsapp_base_path }}/docker-src"
  14. matrix_mautrix_whatsapp_homeserver_address: "{{ matrix_homeserver_container_url }}"
  15. matrix_mautrix_whatsapp_homeserver_domain: "{{ matrix_domain }}"
  16. matrix_mautrix_whatsapp_appservice_address: "http://matrix-mautrix-whatsapp:8080"
  17. # A list of extra arguments to pass to the container
  18. matrix_mautrix_whatsapp_container_extra_arguments: []
  19. # List of systemd services that matrix-mautrix-whatsapp.service depends on.
  20. matrix_mautrix_whatsapp_systemd_required_services_list: ['docker.service']
  21. # List of systemd services that matrix-mautrix-whatsapp.service wants
  22. matrix_mautrix_whatsapp_systemd_wanted_services_list: []
  23. matrix_mautrix_whatsapp_appservice_token: ''
  24. matrix_mautrix_whatsapp_homeserver_token: ''
  25. matrix_mautrix_whatsapp_appservice_bot_username: whatsappbot
  26. # Database-related configuration fields.
  27. #
  28. # To use SQLite, stick to these defaults.
  29. #
  30. # To use Postgres:
  31. # - change the engine (`matrix_mautrix_whatsapp_database_engine: 'postgres'`)
  32. # - adjust your database credentials via the `matrix_mautrix_whatsapp_postgres_*` variables
  33. matrix_mautrix_whatsapp_database_engine: 'sqlite'
  34. matrix_mautrix_whatsapp_sqlite_database_path_local: "{{ matrix_mautrix_whatsapp_data_path }}/mautrix-whatsapp.db"
  35. matrix_mautrix_whatsapp_sqlite_database_path_in_container: "/data/mautrix-whatsapp.db"
  36. matrix_mautrix_whatsapp_database_username: 'matrix_mautrix_whatsapp'
  37. matrix_mautrix_whatsapp_database_password: 'some-password'
  38. matrix_mautrix_whatsapp_database_hostname: 'matrix-postgres'
  39. matrix_mautrix_whatsapp_database_port: 5432
  40. matrix_mautrix_whatsapp_database_name: 'matrix_mautrix_whatsapp'
  41. 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'
  42. matrix_mautrix_whatsapp_appservice_database_type: "{{
  43. {
  44. 'sqlite': 'sqlite3',
  45. 'postgres':'postgres',
  46. }[matrix_mautrix_whatsapp_database_engine]
  47. }}"
  48. matrix_mautrix_whatsapp_appservice_database_uri: "{{
  49. {
  50. 'sqlite': matrix_mautrix_whatsapp_sqlite_database_path_in_container,
  51. 'postgres': matrix_mautrix_whatsapp_database_connection_string,
  52. }[matrix_mautrix_whatsapp_database_engine]
  53. }}"
  54. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  55. matrix_mautrix_whatsapp_login_shared_secret: ''
  56. # Default mautrix-whatsapp configuration template which covers the generic use case.
  57. # You can customize it by controlling the various variables inside it.
  58. #
  59. # For a more advanced customization, you can extend the default (see `matrix_mautrix_whatsapp_configuration_extension_yaml`)
  60. # or completely replace this variable with your own template.
  61. matrix_mautrix_whatsapp_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  62. matrix_mautrix_whatsapp_configuration_extension_yaml: |
  63. # Your custom YAML configuration goes here.
  64. # This configuration extends the default starting configuration (`matrix_mautrix_whatsapp_configuration_yaml`).
  65. #
  66. # You can override individual variables from the default configuration, or introduce new ones.
  67. #
  68. # If you need something more special, you can take full control by
  69. # completely redefining `matrix_mautrix_whatsapp_configuration_yaml`.
  70. 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 {} }}"
  71. # Holds the final configuration (a combination of the default and its extension).
  72. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_whatsapp_configuration_yaml`.
  73. matrix_mautrix_whatsapp_configuration: "{{ matrix_mautrix_whatsapp_configuration_yaml|from_yaml|combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}"
  74. matrix_mautrix_whatsapp_registration_yaml: |
  75. id: whatsapp
  76. url: {{ matrix_mautrix_whatsapp_appservice_address }}
  77. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  78. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  79. # See https://github.com/tulir/mautrix-signal/issues/43
  80. sender_localpart: _bot_{{ matrix_mautrix_whatsapp_appservice_bot_username }}
  81. rate_limited: false
  82. namespaces:
  83. users:
  84. - regex: '^@whatsapp_[0-9]+:{{ matrix_mautrix_whatsapp_homeserver_domain|regex_escape }}$'
  85. exclusive: true
  86. - exclusive: true
  87. regex: '^@{{ matrix_mautrix_whatsapp_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_whatsapp_homeserver_domain|regex_escape }}$'
  88. de.sorunome.msc2409.push_ephemeral: true
  89. matrix_mautrix_whatsapp_registration: "{{ matrix_mautrix_whatsapp_registration_yaml|from_yaml }}"