Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

48 строки
1.7 KiB

  1. # SPDX-FileCopyrightText: 2025 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2025 Catalan Lover <catalanlover@protonmail.com>
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Ensure git installed
  7. ansible.builtin.package:
  8. name: git
  9. state: present
  10. # A checkout owned by a different user (a uid change, an earlier clone by another user, etc.) would make the git task below fail on ownership or permissions.
  11. - name: Ensure synapse-http-antispam repository ownership is correct
  12. ansible.builtin.file:
  13. path: "{{ matrix_synapse_ext_path }}/synapse-http-antispam"
  14. state: directory
  15. owner: "{{ matrix_synapse_uid }}"
  16. group: "{{ matrix_synapse_gid }}"
  17. recurse: true
  18. - name: Clone synapse-http-antispam git repository
  19. ansible.builtin.git:
  20. repo: "{{ matrix_synapse_ext_synapse_http_antispam_git_repository_url }}"
  21. version: "{{ matrix_synapse_ext_synapse_http_antispam_git_version }}"
  22. dest: "{{ matrix_synapse_ext_path }}/synapse-http-antispam"
  23. force: "yes"
  24. become: true
  25. become_user: "{{ matrix_synapse_username }}"
  26. - ansible.builtin.set_fact:
  27. matrix_synapse_modules: >
  28. {{
  29. matrix_synapse_modules | default([])
  30. +
  31. [{
  32. "module": "synapse_http_antispam.HTTPAntispam",
  33. "config": matrix_synapse_ext_synapse_http_antispam_config,
  34. }]
  35. }}
  36. matrix_synapse_container_extra_arguments: >
  37. {{
  38. matrix_synapse_container_extra_arguments | default([])
  39. +
  40. ["--mount type=bind,src=" + matrix_synapse_ext_path + "/synapse-http-antispam/synapse_http_antispam.py,dst=" + matrix_synapse_in_container_python_packages_path + "/synapse_http_antispam.py,ro"]
  41. }}