Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

49 lignes
1.8 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2023 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2019 Michael Haak
  3. # SPDX-FileCopyrightText: 2020 Christian Wolf
  4. # SPDX-FileCopyrightText: 2022 Aaron Raimist
  5. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  6. # SPDX-FileCopyrightText: 2022 Sebastian Gumprich
  7. #
  8. # SPDX-License-Identifier: AGPL-3.0-or-later
  9. ---
  10. - name: Fail if Synapse Simple Antispam blocked homeservers is not set
  11. ansible.builtin.fail:
  12. 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"
  13. when: "matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers | length == 0"
  14. - name: Ensure git installed
  15. ansible.builtin.package:
  16. name: git
  17. state: present
  18. - name: Clone synapse-simple-antispam git repository
  19. ansible.builtin.git:
  20. repo: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_repository_url }}"
  21. version: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_version }}"
  22. dest: "{{ matrix_synapse_ext_path }}/synapse-simple-antispam"
  23. become: true
  24. become_user: "{{ matrix_synapse_username }}"
  25. - ansible.builtin.set_fact:
  26. matrix_synapse_modules: >
  27. {{
  28. matrix_synapse_modules
  29. +
  30. [{
  31. "module": "synapse_simple_antispam.AntiSpamInvites",
  32. "config": {
  33. "blocked_homeservers": matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers
  34. }
  35. }]
  36. }}
  37. matrix_synapse_container_extra_arguments: >
  38. {{
  39. matrix_synapse_container_extra_arguments | default([])
  40. +
  41. ["--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"]
  42. }}