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

104 строки
5.0 KiB

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