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.
 
 

42 lines
1.7 KiB

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