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.
 
 

46 lines
1.9 KiB

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