Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

55 rivejä
1.8 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: false
  12. when: "ansible_os_family == 'RedHat'"
  13. - name: Ensure git installed (Debian)
  14. 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. 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_modules: >
  36. {{ matrix_synapse_modules }}
  37. +
  38. [{
  39. "module": "synapse_simple_antispam.AntiSpamInvites",
  40. "config": {
  41. "blocked_homeservers": {{ matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers }}
  42. }
  43. }]
  44. matrix_synapse_container_extra_arguments: >
  45. {{ matrix_synapse_container_extra_arguments|default([]) }}
  46. +
  47. ["--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"]