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

40 строки
1.5 KiB

  1. ---
  2. - name: Fail if Synapse Simple Antispam blocked homeservers is not set
  3. ansible.builtin.fail:
  4. 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"
  5. when: "matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers | length == 0"
  6. - name: Ensure git installed
  7. ansible.builtin.package:
  8. name: git
  9. state: present
  10. - name: Clone synapse-simple-antispam git repository
  11. ansible.builtin.git:
  12. repo: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_repository_url }}"
  13. version: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_version }}"
  14. dest: "{{ matrix_synapse_ext_path }}/synapse-simple-antispam"
  15. become: true
  16. become_user: "{{ matrix_synapse_username }}"
  17. - ansible.builtin.set_fact:
  18. matrix_synapse_modules: >
  19. {{
  20. matrix_synapse_modules
  21. +
  22. [{
  23. "module": "synapse_simple_antispam.AntiSpamInvites",
  24. "config": {
  25. "blocked_homeservers": matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers
  26. }
  27. }]
  28. }}
  29. matrix_synapse_container_extra_arguments: >
  30. {{
  31. matrix_synapse_container_extra_arguments | default([])
  32. +
  33. ["--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"]
  34. }}