Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

56 lines
2.2 KiB

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