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.
 
 

57 lines
1.7 KiB

  1. ---
  2. - name: Ensure git installed (RedHat)
  3. ansible.builtin.yum:
  4. name:
  5. - git
  6. state: present
  7. update_cache: false
  8. when: "ansible_os_family == 'RedHat'"
  9. - name: Ensure git installed (Debian)
  10. ansible.builtin.apt:
  11. name:
  12. - git
  13. state: present
  14. update_cache: false
  15. when: "ansible_os_family == 'Debian'"
  16. - name: Ensure git installed (Archlinux)
  17. pacman:
  18. name:
  19. - git
  20. state: present
  21. update_cache: false
  22. when: "ansible_distribution == 'Archlinux'"
  23. - name: Clone mjolnir-antispam git repository
  24. ansible.builtin.git:
  25. repo: "{{ matrix_synapse_ext_spam_checker_mjolnir_antispam_git_repository_url }}"
  26. version: "{{ matrix_synapse_ext_spam_checker_mjolnir_antispam_git_version }}"
  27. dest: "{{ matrix_synapse_ext_path }}/mjolnir"
  28. become: true
  29. become_user: "{{ matrix_user_username }}"
  30. - ansible.builtin.set_fact:
  31. matrix_synapse_spam_checker: >
  32. {{
  33. matrix_synapse_spam_checker
  34. +
  35. [{
  36. "module": "mjolnir.AntiSpam",
  37. "config": {
  38. "block_invites": matrix_synapse_ext_spam_checker_mjolnir_antispam_config_block_invites,
  39. "block_messages": matrix_synapse_ext_spam_checker_mjolnir_antispam_config_block_messages,
  40. "block_usernames": matrix_synapse_ext_spam_checker_mjolnir_antispam_config_block_usernames,
  41. "ban_lists": matrix_synapse_ext_spam_checker_mjolnir_antispam_config_ban_lists,
  42. }
  43. }]
  44. }}
  45. matrix_synapse_container_extra_arguments: >
  46. {{
  47. matrix_synapse_container_extra_arguments | default([])
  48. +
  49. ["--mount type=bind,src={{ matrix_synapse_ext_path }}/mjolnir/synapse_antispam/mjolnir,dst={{ matrix_synapse_in_container_python_packages_path }}/mjolnir,ro"]
  50. }}