You cannot 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.3 KiB
YAML

---
- name: Build Jitsi Compose file list
ansible.builtin.set_fact:
jitsi_compose_files:
- docker-compose.yml
- docker-compose.override.yml # not overriding it in the file itself because we're not authoring it
- name: Add optional Compose files
ansible.builtin.set_fact:
jitsi_compose_files: "{{ jitsi_compose_files + [item.file] }}"
when: item.enabled | bool
loop:
- file: jigasi.yml
enabled: "{{ jitsi_enable_jigasi }}"
- file: jibri.yml
enabled: "{{ jitsi_enable_jibri }}"
- file: transcriber.yml
enabled: "{{ jitsi_enable_transcriber }}"
- file: etherpad.yml
enabled: "{{ jitsi_enable_etherpad }}"
- file: etherpad-override.yml
enabled: "{{ jitsi_enable_etherpad }}"
- file: whiteboard.yml
enabled: "{{ jitsi_enable_whiteboard }}"
- name: Build Docker Compose arguments
ansible.builtin.set_fact:
jitsi_compose_args: >-
{{
jitsi_compose_files
| map('regex_replace', '^(.*)$', '-f \1')
| join(' ')
}}
- name: Pull Jitsi images
ansible.builtin.command:
cmd: "docker compose {{ jitsi_compose_args }} pull"
chdir: "{{ jitsi_install_dir }}"
changed_when: true
- name: Start Jitsi
ansible.builtin.command:
cmd: "docker compose {{ jitsi_compose_args }} up -d"
chdir: "{{ jitsi_install_dir }}"
changed_when: true