Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

59 wiersze
1.9 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 (RedHat)
  7. ansible.builtin.yum:
  8. name:
  9. - git
  10. state: present
  11. update_cache: false
  12. when: "ansible_os_family == 'RedHat'"
  13. - name: Ensure git installed (Debian)
  14. ansible.builtin.apt:
  15. name:
  16. - git
  17. state: present
  18. update_cache: false
  19. when: "ansible_os_family == 'Debian'"
  20. - name: Ensure git installed (Archlinux)
  21. pacman:
  22. name:
  23. - git
  24. state: present
  25. update_cache: false
  26. when: "ansible_distribution == 'Archlinux'"
  27. - name: Clone synapse-simple-antispam git repository
  28. ansible.builtin.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. - ansible.builtin.set_fact:
  35. matrix_synapse_modules: >
  36. {{
  37. matrix_synapse_modules
  38. +
  39. [{
  40. "module": "synapse_simple_antispam.AntiSpamInvites",
  41. "config": {
  42. "blocked_homeservers": matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers
  43. }
  44. }]
  45. }}
  46. matrix_synapse_container_extra_arguments: >
  47. {{
  48. matrix_synapse_container_extra_arguments | default([])
  49. +
  50. ["--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"]
  51. }}