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.
 
 

113 lines
7.5 KiB

  1. ---
  2. matrix_synapse_client_api_url_endpoint_public: "https://{{ matrix_server_fqn_matrix }}/_matrix/client/versions"
  3. matrix_synapse_federation_api_url_endpoint_public: "https://{{ matrix_server_fqn_matrix }}:{{ matrix_federation_public_port }}/_matrix/federation/v1/version"
  4. # Tells whether this role had executed or not. Toggled to `true` during runtime.
  5. matrix_synapse_role_executed: false
  6. matrix_synapse_media_store_directory_name: "{{ matrix_synapse_media_store_path | basename }}"
  7. # A Synapse generic worker can handle both federation and client-server API endpoints.
  8. # We wish to split these, as we normally serve federation separately and don't want them mixed up.
  9. #
  10. # This is some ugly Ansible/Jinja2 hack (seen here: https://stackoverflow.com/a/47831492),
  11. # which takes a list of various strings and removes the ones NOT containing `/_matrix/client` anywhere in them.
  12. #
  13. # We intentionally don't do a diff between everything possible (`matrix_synapse_workers_generic_worker_endpoints`) and `matrix_synapse_workers_generic_worker_federation_endpoints`,
  14. # because `matrix_synapse_workers_generic_worker_endpoints` also contains things like `/_synapse/client/`, etc.
  15. # While /_synapse/client/ endpoints are somewhat client-server API-related, they're:
  16. # - neither part of the client-server API spec (and are thus, different)
  17. # - nor always OK to forward to a worker (we're supposed to obey `matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_client_api_enabled`)
  18. #
  19. # It's also not too many of these APIs (only `^/_synapse/client/password_reset/email/submit_token$` at the time of this writing / 2021-01-24),
  20. # so it's not that important whether we forward them or not.
  21. #
  22. # Basically, we aim to cover most things. Skipping `/_synapse/client` or a few other minor things doesn't matter too much.
  23. matrix_synapse_workers_generic_worker_client_server_endpoints: "{{ matrix_synapse_workers_generic_worker_endpoints | default([]) | map('regex_search', '.*/_matrix/client.*') | list | difference([none]) }}"
  24. # A Synapse generic worker can handle both federation and client-server API endpoints.
  25. # We wish to split these, as we normally serve federation separately and don't want them mixed up.
  26. #
  27. # This is some ugly Ansible/Jinja2 hack (seen here: https://stackoverflow.com/a/47831492),
  28. # which takes a list of various strings and removes the ones NOT containing `/_matrix/federation` or `/_matrix/key` anywhere in them.
  29. matrix_synapse_workers_generic_worker_federation_endpoints: "{{ matrix_synapse_workers_generic_worker_endpoints | default([]) | map('regex_search', matrix_synapse_workers_generic_worker_federation_endpoints_regex) | list | difference([none]) }}"
  30. # matrix_synapse_workers_generic_worker_federation_endpoints_regex contains the regex used in matrix_synapse_workers_generic_worker_federation_endpoints.
  31. # It's intentionally put in a separate variable, to avoid tripping ansible-lint's var-spacing rule.
  32. matrix_synapse_workers_generic_worker_federation_endpoints_regex: '.*(/_matrix/federation|/_matrix/key).*'
  33. # matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints contains the endpoints serviced by the `typing` stream writer.
  34. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-typing-stream
  35. matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints:
  36. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing
  37. # matrix_synapse_workers_stream_writer_to_device_stream_worker_client_server_endpoints contains the endpoints serviced by the `to_device` stream writer.
  38. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-to_device-stream
  39. matrix_synapse_workers_stream_writer_to_device_stream_worker_client_server_endpoints:
  40. - ^/_matrix/client/(r0|v3|unstable)/sendToDevice/
  41. # matrix_synapse_workers_stream_writer_account_data_stream_worker_client_server_endpoints contains the endpoints serviced by the `account_data` stream writer.
  42. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-account_data-stream
  43. matrix_synapse_workers_stream_writer_account_data_stream_worker_client_server_endpoints:
  44. - ^/_matrix/client/(r0|v3|unstable)/.*/tags
  45. - ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  46. # matrix_synapse_workers_stream_writer_receipts_stream_worker_client_server_endpoints contains the endpoints serviced by the `recepts` stream writer.
  47. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-receipts-stream
  48. matrix_synapse_workers_stream_writer_receipts_stream_worker_client_server_endpoints:
  49. - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  50. - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  51. # matrix_synapse_workers_stream_writer_presence_stream_worker_client_server_endpoints contains the endpoints serviced by the `presence` stream writer.
  52. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-presence-stream
  53. matrix_synapse_workers_stream_writer_presence_stream_worker_client_server_endpoints:
  54. - ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  55. # matrix_synapse_workers_user_dir_worker_client_server_endpoints contains the endpoints serviced by the `type = user_dir` (`app = generic_worker`) worker.
  56. # See: https://matrix-org.github.io/synapse/latest/workers.html#updating-the-user-directory
  57. matrix_synapse_workers_user_dir_worker_client_server_endpoints:
  58. - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  59. # matrix_synapse_workers_known_stream_writer_stream_types contains the list of stream writer stream types that the playbook recognizes.
  60. # This is used for validation purposes. If adding support for a new type, besides adding it to this list,
  61. # don't forget to actually configure it where appropriate (see worker.yaml.j2`, the nginx proxy configuration, etc).
  62. matrix_synapse_workers_known_stream_writer_stream_types: ['events', 'typing', 'to_device', 'account_data', 'receipts', 'presence']
  63. # matrix_synapse_workers_webserving_stream_writer_types contains a list of stream writer types that serve web (client) requests.
  64. # Not all stream writers serve web requests. Some just perform background tasks.
  65. matrix_synapse_workers_webserving_stream_writer_types: ['typing', 'to_device', 'account_data', 'receipts', 'presence']
  66. # matrix_synapse_workers_systemd_services_list contains a list of systemd services (one for each worker systemd service which serves web requests).
  67. # This list is built during runtime.
  68. # Not all workers serve web requests. Those that don't won't be injected here.
  69. matrix_synapse_webserving_workers_systemd_services_list: []
  70. # matrix_synapse_known_worker_types contains the list of known worker types.
  71. #
  72. # A worker type is different than a worker app (e.g. `generic_worker`).
  73. # For example, the `stream_writer` worker type is served by the `generic_worker` app, but is a separate type that we recognize.
  74. #
  75. # Some other types (`appservice` and `user_dir`) used to be Synapse worker apps, which got subsequently deprecated.
  76. # We still allow these types of workers and map them to the `generic_worker` app,
  77. # which is why we make sure they're part of the list below.
  78. # We use the `unique` filter because they're part of `matrix_synapse_workers_avail_list` too (for now; scheduled for removal).
  79. matrix_synapse_known_worker_types: |
  80. {{
  81. (
  82. matrix_synapse_workers_avail_list
  83. +
  84. ['stream_writer']
  85. +
  86. ['appservice']
  87. +
  88. ['user_dir']
  89. +
  90. ['background']
  91. ) | unique
  92. }}
  93. # matrix_synapse_known_instance_map_eligible_worker_types contains the list of worker types that are to be injected into `matrix_synapse_instance_map`.
  94. matrix_synapse_known_instance_map_eligible_worker_types:
  95. - stream_writer