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.
 
 
 

111 lines
3.9 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  3. SPDX-License-Identifier: AGPL-3.0-or-later
  4. #}
  5. #jinja2: lstrip_blocks: True
  6. matrix:
  7. domain: {{ matrix_domain }}
  8. v1: {{ matrix_ma1sd_v1_enabled|to_json }}
  9. v2: {{ matrix_ma1sd_v2_enabled|to_json }}
  10. server:
  11. name: {{ matrix_server_fqn_matrix }}
  12. key:
  13. path: /var/ma1sd/sign.key
  14. storage:
  15. {% if matrix_ma1sd_database_engine == 'sqlite' %}
  16. backend: sqlite
  17. provider:
  18. sqlite:
  19. database: {{ matrix_ma1sd_sqlite_database_path_in_container|to_json }}
  20. {% elif matrix_ma1sd_database_engine == 'postgres' %}
  21. backend: postgresql
  22. provider:
  23. postgresql:
  24. database: //{{ matrix_ma1sd_database_hostname }}:{{ matrix_ma1sd_database_port }}/{{ matrix_ma1sd_database_name }}
  25. username: {{ matrix_ma1sd_database_username|to_json }}
  26. password: {{ matrix_ma1sd_database_password|to_json }}
  27. {% endif %}
  28. {% if matrix_ma1sd_dns_overwrite_enabled %}
  29. dns:
  30. overwrite:
  31. homeserver:
  32. client:
  33. - name: {{ matrix_ma1sd_dns_overwrite_homeserver_client_name }}
  34. value: {{ matrix_ma1sd_dns_overwrite_homeserver_client_value }}
  35. {% endif %}
  36. {% if matrix_ma1sd_matrixorg_forwarding_enabled %}
  37. forward:
  38. servers: ['matrix-org']
  39. {% endif %}
  40. threepid:
  41. medium:
  42. email:
  43. identity:
  44. from: {{ matrix_ma1sd_threepid_medium_email_identity_from }}
  45. connectors:
  46. smtp:
  47. host: {{ matrix_ma1sd_threepid_medium_email_connectors_smtp_host }}
  48. port: {{ matrix_ma1sd_threepid_medium_email_connectors_smtp_port }}
  49. tls: {{ matrix_ma1sd_threepid_medium_email_connectors_smtp_tls }}
  50. login: {{ matrix_ma1sd_threepid_medium_email_connectors_smtp_login }}
  51. password: {{ matrix_ma1sd_threepid_medium_email_connectors_smtp_password }}
  52. {% if matrix_ma1sd_threepid_medium_email_custom_templates_enabled %}
  53. generators:
  54. template:
  55. {% if matrix_ma1sd_threepid_medium_email_custom_invite_template %}
  56. invite: '/etc/ma1sd/invite-template.eml'
  57. {% endif %}
  58. {% if matrix_ma1sd_threepid_medium_email_custom_session_validation_template or matrix_ma1sd_threepid_medium_email_custom_session_unbind_notification_template %}
  59. session:
  60. {% if matrix_ma1sd_threepid_medium_email_custom_session_validation_template %}
  61. validation: '/etc/ma1sd/validate-template.eml'
  62. {% endif %}
  63. {% if matrix_ma1sd_threepid_medium_email_custom_session_unbind_notification_template %}
  64. unbind:
  65. notification: '/etc/ma1sd/unbind-notification.eml'
  66. {% endif %}
  67. {% endif %}
  68. {% if matrix_ma1sd_threepid_medium_email_custom_matrixid_template %}
  69. generic:
  70. matrixId: '/etc/ma1sd/mxid-template.eml'
  71. {% endif %}
  72. {% endif %}
  73. {% if matrix_ma1sd_view_session_custom_templates_enabled %}
  74. view:
  75. session:
  76. onTokenSubmit:
  77. {% if matrix_ma1sd_view_session_custom_onTokenSubmit_success_template %}
  78. success: '/etc/ma1sd/tokenSubmitSuccess.html'
  79. {% endif %}
  80. {% if matrix_ma1sd_view_session_custom_onTokenSubmit_failure_template %}
  81. failure: '/etc/ma1sd/tokenSubmitFailure.html'
  82. {% endif %}
  83. {% endif %}
  84. {% if matrix_ma1sd_hashing_enabled %}
  85. hashing:
  86. enabled: true # enable or disable the hash lookup MSC2140 (default is false)
  87. pepperLength: 20 # length of the pepper value (default is 20)
  88. rotationPolicy: per_requests # or `per_seconds` how often the hashes will be updating
  89. hashStorageType: sql # or `in_memory` where the hashes will be stored
  90. algorithms:
  91. - none # the same as v1 bulk lookup
  92. - sha256 # hash the 3PID and pepper.
  93. delay: 2m # how often hashes will be updated if rotation policy = per_seconds (default is 10s)
  94. requests: 10
  95. {% endif %}
  96. synapseSql:
  97. enabled: {{ matrix_ma1sd_synapsesql_enabled|to_json }}
  98. type: {{ matrix_ma1sd_synapsesql_type|to_json }}
  99. connection: {{ matrix_ma1sd_synapsesql_connection|to_json }}