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.
 
 

105 line
3.8 KiB

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