Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

50 linhas
1.7 KiB

  1. # SPDX-FileCopyrightText: 2021 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2022 - 2023 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  4. # SPDX-FileCopyrightText: 2022 Sebastian Gumprich
  5. #
  6. # SPDX-License-Identifier: AGPL-3.0-or-later
  7. ---
  8. - name: Ensure git installed
  9. ansible.builtin.package:
  10. name: git
  11. state: present
  12. # A checkout owned by a different user (a uid change, an earlier clone by another user, etc.) would make the git task below fail on ownership or permissions.
  13. - name: Ensure mjolnir-antispam repository ownership is correct
  14. ansible.builtin.file:
  15. path: "{{ matrix_synapse_ext_path }}/mjolnir"
  16. state: directory
  17. owner: "{{ matrix_synapse_uid }}"
  18. group: "{{ matrix_synapse_gid }}"
  19. recurse: true
  20. - name: Clone mjolnir-antispam git repository
  21. ansible.builtin.git:
  22. repo: "{{ matrix_synapse_ext_spam_checker_mjolnir_antispam_git_repository_url }}"
  23. version: "{{ matrix_synapse_ext_spam_checker_mjolnir_antispam_git_version }}"
  24. dest: "{{ matrix_synapse_ext_path }}/mjolnir"
  25. force: "yes"
  26. become: true
  27. become_user: "{{ matrix_synapse_username }}"
  28. - ansible.builtin.set_fact:
  29. matrix_synapse_modules: >
  30. {{
  31. matrix_synapse_modules | default([])
  32. +
  33. [{
  34. "module": "mjolnir.Module",
  35. "config": matrix_synapse_ext_spam_checker_mjolnir_antispam_config,
  36. }]
  37. }}
  38. matrix_synapse_container_extra_arguments: >
  39. {{
  40. matrix_synapse_container_extra_arguments | default([])
  41. +
  42. ["--mount type=bind,src=" + matrix_synapse_ext_path + "/mjolnir/synapse_antispam/mjolnir,dst=" + matrix_synapse_in_container_python_packages_path + "/mjolnir,ro"]
  43. }}