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

50 строки
1.7 KiB

  1. ---
  2. - name: Fail if Synapse Simple Antispam blocked homeservers is not set
  3. 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 (RedHat)
  7. yum:
  8. name:
  9. - git
  10. state: present
  11. update_cache: no
  12. when: "ansible_os_family == 'RedHat'"
  13. - name: Ensure git installed (Debian)
  14. apt:
  15. name:
  16. - git
  17. state: present
  18. update_cache: no
  19. when: "ansible_os_family == 'Debian'"
  20. - name: Ensure git installed (Archlinux)
  21. pacman:
  22. name:
  23. - git
  24. state: present
  25. update_cache: no
  26. when: "ansible_distribution == 'Archlinux'"
  27. - name: Clone synapse-simple-antispam git repository
  28. git:
  29. repo: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_repository_url }}"
  30. version: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_git_version }}"
  31. dest: "{{ matrix_synapse_ext_path }}/synapse-simple-antispam"
  32. become: true
  33. become_user: "{{ matrix_user_username }}"
  34. - set_fact:
  35. matrix_synapse_spam_checker:
  36. module: "synapse_simple_antispam.AntiSpamInvites"
  37. config:
  38. blocked_homeservers: "{{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers }}"
  39. matrix_synapse_container_extra_arguments: >
  40. {{ matrix_synapse_container_extra_arguments|default([]) }}
  41. +
  42. ["--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"]