This repository has been archived on 2024-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
cpx-ansible/roles/docker_services/tasks/services/jitsi_meet.yml

118 lines
3.5 KiB
YAML

# vim: ft=yaml.ansible
---
- name: Create Jitsi Meet volume directories
ansible.builtin.file:
path: "{{ services.jitsi_meet.volume }}/{{ dir }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- web/transcripts
- prosody
loop_control:
loop_var: dir
- name: Create Jitsi Meet volume directories for Prosody
ansible.builtin.file:
path: "{{ services.jitsi_meet.volume }}/{{ dir }}"
owner: '101'
group: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- prosody/plugins
- prosody/config
loop_control:
loop_var: dir
- name: Deploy Jitsi Meet with Docker Compose
community.docker.docker_compose:
project_name: jitsi_meet
state: "{{ 'absent' if stop is defined and stop else 'present' }}"
restarted: "{{ stop is undefined or not stop }}"
remove_orphans: true
pull: true
definition:
version: '3.8'
services:
web:
image: jitsi/web:{{ services.jitsi_meet.version }}
restart: always
environment:
DISABLE_HTTPS: 1
PUBLIC_URL: "{{ services.jitsi_meet.domain }}"
ENABLE_AUTH: '1'
ENABLE_GUESTS: '1'
networks:
meet.jitsi:
services:
aliases:
- jitsi_meet
volumes:
- "{{ services.jitsi_meet.volume }}/web/transcripts:/usr/share/jitsi-meet/transcripts:rw"
prosody:
image: jitsi/prosody:{{ services.jitsi_meet.version }}
restart: always
environment:
JICOFO_AUTH_PASSWORD: "{{ secrets.jitsi_meet.jicofo_auth_password }}"
JVB_AUTH_PASSWORD: "{{ secrets.jitsi_meet.jvb_auth_password }}"
ENABLE_AUTH: '1'
ENABLE_GUESTS: '1'
AUTH_TYPE: internal
networks:
meet.jitsi:
aliases:
- xmpp.meet.jitsi
volumes:
- "{{ services.jitsi_meet.volume }}/prosody/plugins:/prosody-plugins-custom:rw"
- "{{ services.jitsi_meet.volume }}/prosody/config:/config:rw"
expose:
- 5222
- 5280
- 5347
jicofo:
image: jitsi/jicofo:{{ services.jitsi_meet.version }}
restart: always
environment:
JICOFO_AUTH_PASSWORD: "{{ secrets.jitsi_meet.jicofo_auth_password }}"
ENABLE_AUTH: '1'
AUTH_TYPE: internal
networks:
meet.jitsi:
depends_on:
- prosody
jvb:
image: jitsi/jvb:{{ services.jitsi_meet.version }}
restart: always
environment:
JVB_AUTH_PASSWORD: "{{ secrets.jitsi_meet.jvb_auth_password }}"
JVB_WS_DOMAIN: "{{ services.jitsi_meet.domain }}"
networks:
meet.jitsi:
ports:
- 10000:10000/udp
depends_on:
- prosody
networks:
meet.jitsi:
services:
external: true
- name: Check if Jitsi Meet user is registered
ansible.builtin.stat:
path: "{{ services.jitsi_meet.volume }}/prosody/config/data/meet%2ejitsi/accounts/{{ services.jitsi_meet.username }}.dat"
register: jitsi_meet_user
- name: Register Jitsi Meet user
community.docker.docker_container_exec:
container: jitsi_meet_prosody_1
command: |
/usr/bin/prosodyctl --config /config/prosody.cfg.lua register {{ services.jitsi_meet.username }} meet.jitsi {{ secrets.jitsi_meet.password }}
when: (stop is undefined or not stop) and
not jitsi_meet_user.stat.exists