Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

156 řádky
8.5 KiB

  1. ---
  2. # mautrix-wsproxy is a Matrix <-> websocket bridge
  3. # See: https://github.com/mautrix/wsproxy
  4. matrix_mautrix_wsproxy_enabled: true
  5. matrix_mautrix_wsproxy_version: latest
  6. # See: https://mau.dev/mautrix/wsproxy/container_registry
  7. matrix_mautrix_wsproxy_docker_image: "dock.mau.dev/mautrix/wsproxy:{{ matrix_mautrix_wsproxy_version }}"
  8. matrix_mautrix_wsproxy_docker_image_force_pull: "{{ matrix_mautrix_wsproxy_docker_image.endswith(':latest') }}"
  9. matrix_mautrix_wsproxy_base_path: "{{ matrix_base_data_path }}/wsproxy"
  10. matrix_mautrix_wsproxy_config_path: "{{ matrix_mautrix_wsproxy_base_path }}/config"
  11. matrix_mautrix_wsproxy_homeserver_address: "{{ matrix_homeserver_container_url }}"
  12. matrix_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}"
  13. matrix_mautrix_wsproxy_bind_port: false
  14. matrix_mautrix_wsproxy_port: 29331
  15. matrix_mautrix_wsproxy_appservice_address: "http://matrix-mautrix-wsproxy:{{ matrix_mautrix_wsproxy_port }}"
  16. matrix_mautrix_wsproxy_hostname: ""
  17. # The base container network. It will be auto-created by this role if it doesn't exist already.
  18. matrix_mautrix_wsproxy_container_network: matrix-mautrix-wsproxy
  19. # matrix_mautrix_wsproxy_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  20. # See `../templates/labels.j2` for details.
  21. #
  22. # To inject your own other container labels, see `matrix_mautrix_wsproxy_container_labels_additional_labels`.
  23. matrix_mautrix_wsproxy_container_labels_traefik_enabled: true
  24. matrix_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_mautrix_wsproxy_container_network }}"
  25. matrix_mautrix_wsproxy_container_labels_traefik_hostname: "{{ matrix_mautrix_wsproxy_hostname }}"
  26. # The path prefix must either be `/` or not end with a slash (e.g. `/wsproxy`).
  27. matrix_mautrix_wsproxy_container_labels_traefik_rule: "Host(`{{ matrix_mautrix_wsproxy_container_labels_traefik_hostname }}`)"
  28. matrix_mautrix_wsproxy_container_labels_traefik_priority: 0
  29. matrix_mautrix_wsproxy_container_labels_traefik_entrypoints: web-secure
  30. matrix_mautrix_wsproxy_container_labels_traefik_tls: "{{ matrix_mautrix_wsproxy_container_labels_traefik_entrypoints != 'web' }}"
  31. matrix_mautrix_wsproxy_container_labels_traefik_tls_certResolver: default # noqa var-naming
  32. # Controls which additional headers to attach to all HTTP responses.
  33. # To add your own headers, use `matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom`
  34. matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto: {}
  35. matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom: {}
  36. matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers: "{{ matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto | combine(matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom) }}"
  37. # matrix_mautrix_wsproxy_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  38. # See `../templates/labels.j2` for details.
  39. #
  40. # Example:
  41. # matrix_mautrix_wsproxy_container_labels_additional_labels: |
  42. # my.label=1
  43. # another.label="here"
  44. matrix_mautrix_wsproxy_container_labels_additional_labels: ''
  45. # A list of extra arguments to pass to the container
  46. matrix_mautrix_wsproxy_container_extra_arguments: []
  47. # List of systemd services that matrix-mautrix-wsproxy.service depends on.
  48. matrix_mautrix_wsproxy_systemd_required_services_list: ['docker.service']
  49. # List of systemd services that matrix-mautrix-wsproxy.service wants
  50. matrix_mautrix_wsproxy_systemd_wanted_services_list: []
  51. matrix_mautrix_androidsms_appservice_token: ''
  52. matrix_mautrix_androidsms_homeserver_token: ''
  53. matrix_mautrix_imessage_appservice_token: ''
  54. matrix_mautrix_imessage_homeserver_token: ''
  55. matrix_mautrix_androidsms_appservice_bot_username: androidsmsbot
  56. matrix_mautrix_imessage_appservice_bot_username: imessagebot
  57. # Default mautrix-wsproxy configuration template which covers the generic use case.
  58. # You can customize it by controlling the various variables inside it.
  59. #
  60. # For a more advanced customization, you can extend the default (see `matrix_mautrix_wsproxy_configuration_extension_yaml`)
  61. # or completely replace this variable with your own template.
  62. matrix_mautrix_wsproxy_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  63. matrix_mautrix_wsproxy_configuration_extension_yaml: |
  64. # Your custom YAML configuration goes here.
  65. # This configuration extends the default starting configuration (`matrix_mautrix_wsproxy_configuration_yaml`).
  66. #
  67. # You can override individual variables from the default configuration, or introduce new ones.
  68. #
  69. # If you need something more special, you can take full control by
  70. # completely redefining `matrix_mautrix_wsproxy_configuration_yaml`.
  71. 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 {} }}"
  72. # Holds the final configuration (a combination of the default and its extension).
  73. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_wsproxy_configuration_yaml`.
  74. matrix_mautrix_wsproxy_configuration: "{{ matrix_mautrix_wsproxy_configuration_yaml|from_yaml|combine(matrix_mautrix_wsproxy_configuration_extension, recursive=True) }}"
  75. matrix_mautrix_androidsms_registration_yaml: |
  76. id: androidsms
  77. url: {{ matrix_mautrix_wsproxy_appservice_address }}
  78. as_token: "{{ matrix_mautrix_androidsms_appservice_token }}"
  79. hs_token: "{{ matrix_mautrix_androidsms_homeserver_token }}"
  80. sender_localpart: _bot_{{ matrix_mautrix_androidsms_appservice_bot_username }}
  81. rate_limited: false
  82. namespaces:
  83. users:
  84. - regex: '@androidsms_.+:{{ matrix_mautrix_wsproxy_homeserver_domain|regex_escape }}$'
  85. exclusive: true
  86. - exclusive: true
  87. regex: '^@{{ matrix_mautrix_androidsms_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_wsproxy_homeserver_domain|regex_escape }}$'
  88. matrix_mautrix_androidsms_registration: "{{ matrix_mautrix_androidsms_registration_yaml|from_yaml }}"
  89. matrix_mautrix_imessage_registration_yaml: |
  90. id: imessage
  91. url: {{ matrix_mautrix_wsproxy_appservice_address }}
  92. as_token: "{{ matrix_mautrix_imessage_appservice_token }}"
  93. hs_token: "{{ matrix_mautrix_imessage_homeserver_token }}"
  94. sender_localpart: _bot_{{ matrix_mautrix_imessage_appservice_bot_username }}
  95. rate_limited: false
  96. namespaces:
  97. users:
  98. - regex: '@imessage_.+:{{ matrix_mautrix_wsproxy_homeserver_domain|regex_escape }}$'
  99. exclusive: true
  100. - exclusive: true
  101. regex: '^@{{ matrix_mautrix_imessage_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_wsproxy_homeserver_domain|regex_escape }}$'
  102. matrix_mautrix_imessage_registration: "{{ matrix_mautrix_imessage_registration_yaml|from_yaml }}"
  103. # Syncproxy-related configuration fields
  104. matrix_mautrix_wsproxy_syncproxy_version: latest
  105. # See: https://mau.dev/mautrix/wsproxy/container_registry
  106. matrix_mautrix_wsproxy_syncproxy_docker_image: "dock.mau.dev/mautrix/syncproxy:{{ matrix_mautrix_wsproxy_syncproxy_version }}"
  107. matrix_mautrix_wsproxy_syncproxy_docker_image_force_pull: "{{ matrix_mautrix_wsproxy_syncproxy_docker_image.endswith(':latest') }}"
  108. matrix_mautrix_wsproxy_syncproxy_container_extra_arguments: []
  109. matrix_mautrix_wsproxy_syncproxy_systemd_required_services_list: ['docker.service', 'matrix-mautrix-wsproxy.service']
  110. matrix_mautrix_wsproxy_syncproxy_systemd_wanted_services_list: []
  111. matrix_mautrix_wsproxy_syncproxy_shared_secret: ''
  112. matrix_mautrix_wsproxy_syncproxy_port: 29332
  113. matrix_mautrix_wsproxy_syncproxy_appservice_address: "http://matrix-mautrix-wsproxy-syncproxy:{{ matrix_mautrix_wsproxy_syncproxy_port }}"
  114. # Database-related configuration fields
  115. #
  116. # This bridge supports Postgres and SQLite.
  117. #
  118. matrix_mautrix_wsproxy_syncproxy_database_engine: 'postgres'
  119. matrix_mautrix_wsproxy_syncproxy_database_username: 'matrix_mautrix_wsproxy_syncproxy'
  120. matrix_mautrix_wsproxy_syncproxy_database_password: 'some-password'
  121. matrix_mautrix_wsproxy_syncproxy_database_hostname: 'matrix-postgres'
  122. matrix_mautrix_wsproxy_syncproxy_database_port: 5432
  123. matrix_mautrix_wsproxy_syncproxy_database_name: 'matrix_mautrix_wsproxy_syncproxy'
  124. matrix_mautrix_signal_wsproxy_syncproxy_connection_string: 'postgres://{{ matrix_mautrix_wsproxy_syncproxy_database_username }}:{{ matrix_mautrix_wsproxy_syncproxy_database_password }}@{{ matrix_mautrix_wsproxy_syncproxy_database_hostname }}:{{ matrix_mautrix_wsproxy_syncproxy_database_port }}/{{ matrix_mautrix_wsproxy_syncproxy_database_name }}'