2024-09-30 22:20:46 +10:00
|
|
|
---
|
|
|
|
|
2024-11-21 16:54:45 +02:00
|
|
|
- name: Ensure LiveKit Server paths exist
|
2024-09-30 22:20:46 +10:00
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
state: directory
|
|
|
|
mode: 0750
|
2024-11-21 17:28:06 +02:00
|
|
|
owner: "{{ livekit_server_uid }}"
|
|
|
|
group: "{{ livekit_server_gid }}"
|
2024-09-30 22:20:46 +10:00
|
|
|
with_items:
|
2024-11-21 17:28:06 +02:00
|
|
|
- {path: "{{ livekit_server_base_path }}", when: true}
|
|
|
|
- {path: "{{ livekit_server_config_path }}", when: true}
|
|
|
|
- {path: "{{ livekit_server_container_src_files_path }}", when: "{{ livekit_server_container_image_self_build }}"}
|
|
|
|
when: "item.when | bool"
|
2024-09-30 22:20:46 +10:00
|
|
|
|
2024-11-21 17:28:06 +02:00
|
|
|
- name: Ensure LiveKit Server configuration is in place
|
2024-09-30 22:20:46 +10:00
|
|
|
ansible.builtin.template:
|
2024-11-21 17:28:06 +02:00
|
|
|
src: "{{ role_path }}/templates/config.yaml.j2"
|
|
|
|
dest: "{{ livekit_server_config_path }}/config.yaml"
|
2024-09-30 22:20:46 +10:00
|
|
|
mode: 0640
|
2024-11-21 17:28:06 +02:00
|
|
|
owner: "{{ livekit_server_uid }}"
|
|
|
|
group: "{{ livekit_server_gid }}"
|
2024-09-30 22:20:46 +10:00
|
|
|
|
2024-11-21 16:54:45 +02:00
|
|
|
- name: Ensure LiveKit Server labels file is in place
|
2024-09-30 22:20:46 +10:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ role_path }}/templates/labels.j2"
|
2024-11-21 16:15:54 +02:00
|
|
|
dest: "{{ livekit_server_base_path }}/labels"
|
2024-09-30 22:20:46 +10:00
|
|
|
mode: 0640
|
2024-11-21 17:28:06 +02:00
|
|
|
owner: "{{ livekit_server_uid }}"
|
|
|
|
group: "{{ livekit_server_gid }}"
|
2024-09-30 22:20:46 +10:00
|
|
|
|
2024-11-21 16:54:45 +02:00
|
|
|
- name: Ensure LiveKit Server container image is pulled
|
2024-09-30 22:20:46 +10:00
|
|
|
community.docker.docker_image:
|
2024-11-21 16:16:43 +02:00
|
|
|
name: "{{ livekit_server_container_image }}"
|
2024-09-30 22:20:46 +10:00
|
|
|
source: pull
|
|
|
|
register: livekit_image_result
|
2024-11-21 17:28:06 +02:00
|
|
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
|
|
|
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
2024-09-30 22:20:46 +10:00
|
|
|
until: livekit_image_result is not failed
|
|
|
|
|
2024-11-21 16:54:45 +02:00
|
|
|
- name: Ensure LiveKit Server systemd service is installed
|
2024-09-30 22:20:46 +10:00
|
|
|
ansible.builtin.template:
|
2024-11-21 16:54:45 +02:00
|
|
|
src: "{{ role_path }}/templates/systemd/livekit-server.service.j2"
|
|
|
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ livekit_server_identifier }}.service"
|
2024-11-21 16:15:54 +02:00
|
|
|
mode: 0644
|