Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

44 Zeilen
1.6 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Fail if Synapse Simple Antispam blocked homeservers is not set
  6. ansible.builtin.fail:
  7. msg: "Synapse Simple Antispam is enabled, but no blocked homeservers have been set in matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers"
  8. when: "matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers | length == 0"
  9. - name: Ensure git installed
  10. ansible.builtin.package:
  11. name: git
  12. state: present
  13. - name: Clone synapse-simple-antispam git repository
  14. ansible.builtin.git:
  15. repo: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_repository_url }}"
  16. version: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_version }}"
  17. dest: "{{ matrix_synapse_ext_path }}/synapse-simple-antispam"
  18. become: true
  19. become_user: "{{ matrix_synapse_username }}"
  20. - ansible.builtin.set_fact:
  21. matrix_synapse_modules: >
  22. {{
  23. matrix_synapse_modules
  24. +
  25. [{
  26. "module": "synapse_simple_antispam.AntiSpamInvites",
  27. "config": {
  28. "blocked_homeservers": matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers
  29. }
  30. }]
  31. }}
  32. matrix_synapse_container_extra_arguments: >
  33. {{
  34. matrix_synapse_container_extra_arguments | default([])
  35. +
  36. ["--mount type=bind,src={{ matrix_synapse_ext_path }}/synapse-simple-antispam/synapse_simple_antispam,dst={{ matrix_synapse_in_container_python_packages_path }}/synapse_simple_antispam,ro"]
  37. }}