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.
 
 

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