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. - name: Ensure Matrix jitsi-prosody environment exists
  3. ansible.builtin.file:
  4. path: "{{ item.path }}"
  5. state: directory
  6. mode: 0777
  7. owner: "{{ matrix_user_username }}"
  8. group: "{{ matrix_user_groupname }}"
  9. with_items:
  10. - {path: "{{ matrix_jitsi_prosody_base_path }}", when: true}
  11. - {path: "{{ matrix_jitsi_prosody_config_path }}", when: true}
  12. - {path: "{{ matrix_jitsi_prosody_plugins_path }}", when: true}
  13. when: item.when | bool
  14. - name: Ensure jitsi-prosody Docker image is pulled
  15. community.docker.docker_image:
  16. name: "{{ matrix_jitsi_prosody_docker_image }}"
  17. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  18. force_source: "{{ matrix_jitsi_prosody_docker_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_jitsi_prosody_docker_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. - name: Ensure jitsi-prosody environment variables file is created
  25. ansible.builtin.template:
  26. src: "{{ role_path }}/templates/prosody/env.j2"
  27. dest: "{{ matrix_jitsi_prosody_base_path }}/env"
  28. owner: "{{ matrix_user_username }}"
  29. group: "{{ matrix_user_groupname }}"
  30. mode: 0640
  31. - name: Ensure matrix-jitsi-prosody.service file is installed
  32. ansible.builtin.template:
  33. src: "{{ role_path }}/templates/prosody/matrix-jitsi-prosody.service.j2"
  34. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-jitsi-prosody.service"
  35. mode: 0644
  36. register: matrix_jitsi_prosody_systemd_service_result
  37. - name: Ensure authentication is properly configured
  38. ansible.builtin.include_tasks:
  39. file: "{{ role_path }}/tasks/util/setup_jitsi_auth.yml"
  40. when: matrix_jitsi_enable_auth | bool