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

127 строки
6.4 KiB

  1. # mautrix-telegram is a Matrix <-> Telegram bridge
  2. # See: https://github.com/tulir/mautrix-telegram
  3. matrix_mautrix_telegram_enabled: true
  4. matrix_mautrix_telegram_container_self_build: false
  5. matrix_mautrix_telegram_docker_repo: "https://mau.dev/tulir/mautrix-telegram.git"
  6. matrix_mautrix_telegram_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-telegram/docker-src"
  7. matrix_mautrix_telegram_version: v0.9.0
  8. # See: https://mau.dev/tulir/mautrix-telegram/container_registry
  9. matrix_mautrix_telegram_docker_image: "dock.mau.dev/tulir/mautrix-telegram:{{ matrix_mautrix_telegram_version }}"
  10. matrix_mautrix_telegram_docker_image_force_pull: "{{ matrix_mautrix_telegram_docker_image.endswith(':latest') }}"
  11. matrix_mautrix_telegram_base_path: "{{ matrix_base_data_path }}/mautrix-telegram"
  12. matrix_mautrix_telegram_config_path: "{{ matrix_mautrix_telegram_base_path }}/config"
  13. matrix_mautrix_telegram_data_path: "{{ matrix_mautrix_telegram_base_path }}/data"
  14. # Get your own API keys at https://my.telegram.org/apps
  15. matrix_mautrix_telegram_api_id: ''
  16. matrix_mautrix_telegram_api_hash: ''
  17. matrix_mautrix_telegram_bot_token: disabled
  18. # Mautrix telegram public endpoint to log in to telegram
  19. # Use an uuid so it's not easily discoverable.
  20. # Example: /741a0483-ba17-4682-9900-30bd7269f1cc
  21. matrix_mautrix_telegram_public_endpoint: ''
  22. matrix_mautrix_telegram_homeserver_address: "{{ matrix_homeserver_container_url }}"
  23. matrix_mautrix_telegram_homeserver_domain: '{{ matrix_domain }}'
  24. matrix_mautrix_telegram_appservice_address: 'http://matrix-mautrix-telegram:8080'
  25. matrix_mautrix_telegram_appservice_public_external: 'https://{{ matrix_server_fqn_matrix }}{{ matrix_mautrix_telegram_public_endpoint }}'
  26. matrix_mautrix_telegram_appservice_bot_username: telegrambot
  27. # Controls whether the matrix-mautrix-telegram container exposes its HTTP port (tcp/8080 in the container).
  28. #
  29. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9006"), or empty string to not expose.
  30. matrix_mautrix_telegram_container_http_host_bind_port: ''
  31. # A list of extra arguments to pass to the container
  32. matrix_mautrix_telegram_container_extra_arguments: []
  33. # List of systemd services that matrix-mautrix-telegram.service depends on.
  34. matrix_mautrix_telegram_systemd_required_services_list: ['docker.service']
  35. # List of systemd services that matrix-mautrix-telegram.service wants
  36. matrix_mautrix_telegram_systemd_wanted_services_list: []
  37. matrix_mautrix_telegram_appservice_token: ''
  38. matrix_mautrix_telegram_homeserver_token: ''
  39. # Database-related configuration fields.
  40. #
  41. # To use SQLite, stick to these defaults.
  42. #
  43. # To use Postgres:
  44. # - change the engine (`matrix_mautrix_telegram_database_engine: 'postgres'`)
  45. # - adjust your database credentials via the `matrix_mautrix_telegram_postgres_*` variables
  46. matrix_mautrix_telegram_database_engine: 'sqlite'
  47. matrix_mautrix_telegram_sqlite_database_path_local: "{{ matrix_mautrix_telegram_data_path }}/mautrix-telegram.db"
  48. matrix_mautrix_telegram_sqlite_database_path_in_container: "/data/mautrix-telegram.db"
  49. matrix_mautrix_telegram_database_username: 'matrix_mautrix_telegram'
  50. matrix_mautrix_telegram_database_password: 'some-password'
  51. matrix_mautrix_telegram_database_hostname: 'matrix-postgres'
  52. matrix_mautrix_telegram_database_port: 5432
  53. matrix_mautrix_telegram_database_name: 'matrix_mautrix_telegram'
  54. matrix_mautrix_telegram_database_connection_string: 'postgres://{{ matrix_mautrix_telegram_database_username }}:{{ matrix_mautrix_telegram_database_password }}@{{ matrix_mautrix_telegram_database_hostname }}:{{ matrix_mautrix_telegram_database_port }}/{{ matrix_mautrix_telegram_database_name }}'
  55. matrix_mautrix_telegram_appservice_database: "{{
  56. {
  57. 'sqlite': ('sqlite:///' + matrix_mautrix_telegram_sqlite_database_path_in_container),
  58. 'postgres': matrix_mautrix_telegram_database_connection_string,
  59. }[matrix_mautrix_telegram_database_engine]
  60. }}"
  61. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  62. matrix_mautrix_telegram_login_shared_secret: ''
  63. # Default configuration template which covers the generic use case.
  64. # You can customize it by controlling the various variables inside it.
  65. #
  66. # For a more advanced customization, you can extend the default (see `matrix_mautrix_telegram_configuration_extension_yaml`)
  67. # or completely replace this variable with your own template.
  68. matrix_mautrix_telegram_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  69. matrix_mautrix_telegram_configuration_extension_yaml: |
  70. # Your custom YAML configuration goes here.
  71. # This configuration extends the default starting configuration (`matrix_mautrix_telegram_configuration_yaml`).
  72. #
  73. # You can override individual variables from the default configuration, or introduce new ones.
  74. #
  75. # If you need something more special, you can take full control by
  76. # completely redefining `matrix_mautrix_telegram_configuration_yaml`.
  77. matrix_mautrix_telegram_configuration_extension: "{{ matrix_mautrix_telegram_configuration_extension_yaml|from_yaml if matrix_mautrix_telegram_configuration_extension_yaml|from_yaml is mapping else {} }}"
  78. # Holds the final configuration (a combination of the default and its extension).
  79. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_telegram_configuration_yaml`.
  80. matrix_mautrix_telegram_configuration: "{{ matrix_mautrix_telegram_configuration_yaml|from_yaml|combine(matrix_mautrix_telegram_configuration_extension, recursive=True) }}"
  81. matrix_mautrix_telegram_registration_yaml: |
  82. id: telegram
  83. as_token: "{{ matrix_mautrix_telegram_appservice_token }}"
  84. hs_token: "{{ matrix_mautrix_telegram_homeserver_token }}"
  85. namespaces:
  86. users:
  87. - exclusive: true
  88. regex: '^@telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$'
  89. - exclusive: true
  90. regex: '^@{{ matrix_mautrix_telegram_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$'
  91. aliases:
  92. - exclusive: true
  93. regex: '^#telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$'
  94. # See https://github.com/tulir/mautrix-signal/issues/43
  95. sender_localpart: _bot_{{ matrix_mautrix_telegram_appservice_bot_username }}
  96. url: {{ matrix_mautrix_telegram_appservice_address }}
  97. rate_limited: false
  98. de.sorunome.msc2409.push_ephemeral: true
  99. matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml|from_yaml }}"