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.8 KiB

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