Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

50 rader
2.0 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - ansible.builtin.include_role:
  6. name: custom/matrix-base
  7. tasks_from: ensure_fuse_installed
  8. - name: Ensure Goofys Docker image is pulled
  9. community.docker.docker_image:
  10. name: "{{ matrix_s3_goofys_docker_image }}"
  11. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  12. force_source: "{{ matrix_s3_goofys_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  13. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_s3_goofys_docker_image_force_pull }}"
  14. register: result
  15. retries: "{{ devture_playbook_help_container_retries_count }}"
  16. delay: "{{ devture_playbook_help_container_retries_delay }}"
  17. until: result is not failed
  18. # This will throw a Permission Denied error if already mounted
  19. - name: Check Matrix Goofys external storage mountpoint path
  20. ansible.builtin.stat:
  21. path: "{{ matrix_s3_media_store_path }}"
  22. register: local_path_matrix_s3_media_store_path_stat
  23. ignore_errors: true
  24. - name: Ensure Matrix Goofys external storage mountpoint exists
  25. ansible.builtin.file:
  26. path: "{{ matrix_s3_media_store_path }}"
  27. state: directory
  28. mode: 0750
  29. owner: "{{ matrix_synapse_uid }}"
  30. group: "{{ matrix_synapse_gid }}"
  31. when: "not local_path_matrix_s3_media_store_path_stat.failed and not local_path_matrix_s3_media_store_path_stat.stat.exists"
  32. - name: Ensure goofys environment variables file created
  33. ansible.builtin.template:
  34. src: "{{ role_path }}/templates/goofys/env-goofys.j2"
  35. dest: "{{ matrix_synapse_config_dir_path }}/env-goofys"
  36. owner: root
  37. mode: 0600
  38. - name: Ensure matrix-goofys.service installed
  39. ansible.builtin.template:
  40. src: "{{ role_path }}/templates/goofys/systemd/matrix-goofys.service.j2"
  41. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-goofys.service"
  42. mode: 0644