diff --git a/roles/custom/matrix-element-call/tasks/install.yml b/roles/custom/matrix-element-call/tasks/install.yml index 48719f413..cd0612fce 100644 --- a/roles/custom/matrix-element-call/tasks/install.yml +++ b/roles/custom/matrix-element-call/tasks/install.yml @@ -11,24 +11,13 @@ group: "{{ matrix_user_groupname }}" with_items: - path: "{{ matrix_element_call_base_path }}" - - path: "{{ matrix_element_call_base_path }}/data" - - path: "{{ matrix_element_call_base_path }}/config" - - path: "{{ matrix_element_call_base_path }}/backend" # For LiveKit and Redis config - path: "{{ matrix_base_data_path }}/static-files/public/.well-known/element" # Directory for element.json # Ensure Configuration Files are in Place - name: Ensure Element Call config.json is in place ansible.builtin.template: src: "{{ role_path }}/templates/config.json.j2" - dest: "{{ matrix_element_call_base_path }}/config/config.json" - mode: 0640 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - -- name: Ensure LiveKit livekit.yaml is in place - ansible.builtin.template: - src: "{{ role_path }}/templates/livekit.yaml.j2" - dest: "{{ matrix_element_call_base_path }}/backend/livekit.yaml" + dest: "{{ matrix_element_call_base_path }}/config.json" mode: 0640 owner: "{{ matrix_user_username }}" group: "{{ matrix_user_groupname }}" @@ -41,34 +30,10 @@ owner: "{{ matrix_user_username }}" group: "{{ matrix_user_groupname }}" -- name: Ensure matrix-element-call environment file is in place - ansible.builtin.template: - src: "{{ role_path }}/templates/env.j2" - dest: "{{ matrix_element_call_base_path }}/config/env" - mode: 0640 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - - name: Ensure matrix-element-call Docker labels file is in place ansible.builtin.template: src: "{{ role_path }}/templates/element-call-labels.j2" - dest: "{{ matrix_element_call_base_path }}/config/element-call-labels" - mode: 0640 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - -- name: Ensure LiveKit labels file is in place - ansible.builtin.template: - src: "{{ role_path }}/templates/livekit-labels.j2" - dest: "{{ matrix_element_call_base_path }}/config/livekit-labels" - mode: 0640 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - -- name: Ensure JWT Service labels file is in place - ansible.builtin.template: - src: "{{ role_path }}/templates/jwt-service-labels.j2" - dest: "{{ matrix_element_call_base_path }}/config/jwt-service-labels" + dest: "{{ matrix_element_call_base_path }}/element-call-labels" mode: 0640 owner: "{{ matrix_user_username }}" group: "{{ matrix_user_groupname }}" @@ -84,24 +49,6 @@ delay: "{{ devture_playbook_help_container_retries_delay }}" until: element_call_image_result is not failed -- name: Ensure jwt-service Docker image is pulled - community.docker.docker_image: - name: "{{ matrix_jwt_service_image }}" - source: pull - register: jwt_image_result - retries: 3 - delay: 10 - until: jwt_image_result is not failed - -- name: Ensure livekit Docker image is pulled - community.docker.docker_image: - name: "{{ matrix_livekit_image }}" - source: pull - register: livekit_image_result - retries: 3 - delay: 10 - until: livekit_image_result is not failed - - name: Ensure redis Docker image is pulled community.docker.docker_image: name: "{{ redis_image }}" @@ -119,18 +66,6 @@ dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-element-call.service" mode: 0644 -- name: Ensure jwt-service systemd service is installed - ansible.builtin.template: - src: "{{ role_path }}/templates/systemd/matrix-jwt-service.service.j2" - dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-jwt-service.service" - mode: 0644 - -- name: Ensure livekit systemd service is installed - ansible.builtin.template: - src: "{{ role_path }}/templates/systemd/matrix-livekit.service.j2" - dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-livekit.service" - mode: 0644 - - name: Ensure redis systemd service is installed ansible.builtin.template: src: "{{ role_path }}/templates/systemd/matrix-redis.service.j2" diff --git a/roles/custom/matrix-element-call/tasks/uninstall.yml b/roles/custom/matrix-element-call/tasks/uninstall.yml index d9a77415f..d137136c2 100644 --- a/roles/custom/matrix-element-call/tasks/uninstall.yml +++ b/roles/custom/matrix-element-call/tasks/uninstall.yml @@ -6,16 +6,6 @@ name: "matrix-element-call" state: absent -- name: Stop and remove jwt-service container - community.docker.docker_container: - name: "matrix-jwt-service" - state: absent - -- name: Stop and remove livekit container - community.docker.docker_container: - name: "matrix-livekit" - state: absent - - name: Stop and remove redis container community.docker.docker_container: name: "matrix-redis" @@ -26,16 +16,6 @@ path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-element-call.service" state: absent -- name: Remove jwt-service systemd service - ansible.builtin.file: - path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-jwt-service.service" - state: absent - -- name: Remove livekit systemd service - ansible.builtin.file: - path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-livekit.service" - state: absent - - name: Remove redis systemd service ansible.builtin.file: path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-redis.service" diff --git a/roles/custom/matrix-element-call/tasks/validate_config.yml b/roles/custom/matrix-element-call/tasks/validate_config.yml index 7760cb94e..5c00dcc92 100644 --- a/roles/custom/matrix-element-call/tasks/validate_config.yml +++ b/roles/custom/matrix-element-call/tasks/validate_config.yml @@ -10,8 +10,4 @@ - {'name': 'matrix_element_call_base_path', when: true} - {'name': 'matrix_element_call_container_network', when: true} - {'name': 'matrix_element_call_image', when: true} - - {'name': 'matrix_jwt_service_image', when: true} - - {'name': 'matrix_livekit_image', when: true} - {'name': 'redis_image', when: true} - - {'name': 'matrix_element_call_livekit_dev_key', when: true} - - {'name': 'matrix_jwt_service_url', when: true} diff --git a/roles/custom/matrix-element-call/templates/systemd/matrix-element-call.service.j2 b/roles/custom/matrix-element-call/templates/systemd/matrix-element-call.service.j2 index 6048f9e4d..b9e2c315b 100644 --- a/roles/custom/matrix-element-call/templates/systemd/matrix-element-call.service.j2 +++ b/roles/custom/matrix-element-call/templates/systemd/matrix-element-call.service.j2 @@ -23,7 +23,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ {% if matrix_element_call_container_http_host_bind_port %} -p {{ matrix_element_call_container_http_host_bind_port }}:8080 \ {% endif %} - --label-file={{ matrix_element_call_base_path }}/config/element-call-labels \ + --label-file={{ matrix_element_call_base_path }}/element-call-labels \ {% for arg in matrix_element_call_container_extra_arguments %} {{ arg }} \ {% endfor %}