2024-11-21 16:54:45 +02:00

43 lines
1.3 KiB
YAML

---
- name: Ensure LiveKit Server paths exist
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
mode: 0750
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
with_items:
- path: "{{ livekit_server_base_path }}"
- name: Ensure LiveKit Server livekit.yaml is in place
ansible.builtin.template:
src: "{{ role_path }}/templates/livekit.yaml.j2"
dest: "{{ livekit_server_base_path }}/livekit.yaml"
mode: 0640
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure LiveKit Server labels file is in place
ansible.builtin.template:
src: "{{ role_path }}/templates/labels.j2"
dest: "{{ livekit_server_base_path }}/labels"
mode: 0640
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure LiveKit Server container image is pulled
community.docker.docker_image:
name: "{{ livekit_server_container_image }}"
source: pull
register: livekit_image_result
retries: 3
delay: 10
until: livekit_image_result is not failed
- name: Ensure LiveKit Server systemd service is installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/livekit-server.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ livekit_server_identifier }}.service"
mode: 0644