Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

114 líneas
5.4 KiB

  1. # mautrix-wsproxy is a Matrix <-> websocket bridge
  2. # See: https://github.com/tulir/mautrix-wsproxy
  3. matrix_mautrix_wsproxy_enabled: true
  4. matrix_mautrix_wsproxy_version: latest
  5. # See: https://mau.dev/tulir/mautrix-wsproxy/container_registry
  6. matrix_mautrix_wsproxy_docker_image: "dock.mau.dev/tulir/mautrix-wsproxy:{{ matrix_mautrix_wsproxy_version }}"
  7. matrix_mautrix_wsproxy_docker_image_force_pull: "{{ matrix_mautrix_wsproxy_docker_image.endswith(':latest') }}"
  8. matrix_mautrix_wsproxy_base_path: "{{ matrix_base_data_path }}/mautrix-wsproxy"
  9. matrix_mautrix_wsproxy_config_path: "{{ matrix_mautrix_wsproxy_base_path }}/config"
  10. matrix_mautrix_wsproxy_homeserver_address: "{{ matrix_homeserver_container_url }}"
  11. matrix_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}"
  12. matrix_mautrix_wsproxy_appservice_address: "http://matrix-mautrix-wsproxy:8080"
  13. # A list of extra arguments to pass to the container
  14. matrix_mautrix_wsproxy_container_extra_arguments: []
  15. # List of systemd services that matrix-mautrix-wsproxy.service depends on.
  16. matrix_mautrix_wsproxy_systemd_required_services_list: ['docker.service']
  17. # List of systemd services that matrix-mautrix-wsproxy.service wants
  18. matrix_mautrix_wsproxy_systemd_wanted_services_list: []
  19. matrix_mautrix_wsproxy_appservice_token: ''
  20. matrix_mautrix_wsproxy_homeserver_token: ''
  21. matrix_mautrix_wsproxy_appservice_bot_username: wsproxy
  22. # Database-related configuration fields.
  23. #
  24. # To use SQLite, stick to these defaults.
  25. #
  26. # To use Postgres:
  27. # - change the engine (`matrix_mautrix_wsproxy_database_engine: 'postgres'`)
  28. # - adjust your database credentials via the `matrix_mautrix_wsproxy_postgres_*` variables
  29. matrix_mautrix_wsproxy_database_engine: 'sqlite'
  30. matrix_mautrix_wsproxy_sqlite_database_path_local: "{{ matrix_mautrix_wsproxy_data_path }}/mautrix-wsproxy.db"
  31. matrix_mautrix_wsproxy_sqlite_database_path_in_container: "/data/mautrix-wsproxy.db"
  32. matrix_mautrix_wsproxy_database_username: 'matrix_mautrix_wsproxy'
  33. matrix_mautrix_wsproxy_database_password: 'some-password'
  34. matrix_mautrix_wsproxy_database_hostname: 'matrix-postgres'
  35. matrix_mautrix_wsproxy_database_port: 5432
  36. matrix_mautrix_wsproxy_database_name: 'matrix_mautrix_wsproxy'
  37. matrix_mautrix_wsproxy_database_connection_string: 'postgresql://{{ matrix_mautrix_wsproxy_database_username }}:{{ matrix_mautrix_wsproxy_database_password }}@{{ matrix_mautrix_wsproxy_database_hostname }}:{{ matrix_mautrix_wsproxy_database_port }}/{{ matrix_mautrix_wsproxy_database_name }}?sslmode=disable'
  38. matrix_mautrix_wsproxy_appservice_database_type: "{{
  39. {
  40. 'sqlite': 'sqlite3',
  41. 'postgres':'postgres',
  42. }[matrix_mautrix_wsproxy_database_engine]
  43. }}"
  44. matrix_mautrix_wsproxy_appservice_database_uri: "{{
  45. {
  46. 'sqlite': matrix_mautrix_wsproxy_sqlite_database_path_in_container,
  47. 'postgres': matrix_mautrix_wsproxy_database_connection_string,
  48. }[matrix_mautrix_wsproxy_database_engine]
  49. }}"
  50. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  51. matrix_mautrix_wsproxy_login_shared_secret: ''
  52. # Default mautrix-wsproxy configuration template which covers the generic use case.
  53. # You can customize it by controlling the various variables inside it.
  54. #
  55. # For a more advanced customization, you can extend the default (see `matrix_mautrix_wsproxy_configuration_extension_yaml`)
  56. # or completely replace this variable with your own template.
  57. matrix_mautrix_wsproxy_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  58. matrix_mautrix_wsproxy_configuration_extension_yaml: |
  59. # Your custom YAML configuration goes here.
  60. # This configuration extends the default starting configuration (`matrix_mautrix_wsproxy_configuration_yaml`).
  61. #
  62. # You can override individual variables from the default configuration, or introduce new ones.
  63. #
  64. # If you need something more special, you can take full control by
  65. # completely redefining `matrix_mautrix_wsproxy_configuration_yaml`.
  66. matrix_mautrix_wsproxy_configuration_extension: "{{ matrix_mautrix_wsproxy_configuration_extension_yaml|from_yaml if matrix_mautrix_wsproxy_configuration_extension_yaml|from_yaml is mapping else {} }}"
  67. # Holds the final configuration (a combination of the default and its extension).
  68. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_wsproxy_configuration_yaml`.
  69. matrix_mautrix_wsproxy_configuration: "{{ matrix_mautrix_wsproxy_configuration_yaml|from_yaml|combine(matrix_mautrix_wsproxy_configuration_extension, recursive=True) }}"
  70. matrix_mautrix_wsproxy_registration_yaml: |
  71. # appservice -> id from the config
  72. id: wsproxy
  73. # appservice -> as_token and hs_token from the config
  74. as_token: random string
  75. hs_token: random string
  76. namespaces:
  77. users:
  78. # The localpart here is username_template from the config, but .+ instead of {{.}}
  79. - regex: '@imessage_.+:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$'
  80. exclusive: true
  81. # Localpart here is appservice -> bot -> username from the config
  82. - regex: '@imessagebot:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$'
  83. exclusive: true
  84. # Address that Synapse uses to contact mautrix-wsproxy
  85. url: {{ matrix_mautrix_wsproxy_appservice_address }}
  86. # Put a new random string here, it doesn't affect anything else
  87. sender_localpart: random string
  88. rate_limited: false
  89. matrix_mautrix_wsproxy_registration: "{{ matrix_mautrix_wsproxy_registration_yaml|from_yaml }}"