119 lines
3.6 KiB
YAML
119 lines
3.6 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 down is defined and down else 'present' }}"
|
|
restarted: "{{ restart is defined and restart }}"
|
|
recreate: "{{ 'always' if recreate is defined and recreate else 'smart' }}"
|
|
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: (down is undefined or not down) and
|
|
not jitsi_meet_user.stat.exists
|