Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

116 lines
5.7 KiB

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