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

119 lines
3.6 KiB
YAML
Raw Normal View History

2023-04-20 21:34:25 +00:00
# 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
2023-06-26 16:35:34 +00:00
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
2023-04-20 21:34:25 +00:00
loop:
- prosody/plugins
2023-06-26 16:35:34 +00:00
- prosody/config
2023-04-20 21:34:25 +00:00
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' }}"
2023-04-26 16:49:36 +00:00
remove_orphans: true
2023-04-20 21:34:25 +00:00
pull: true
definition:
version: '3.8'
services:
2023-06-26 16:35:34 +00:00
web:
2023-04-20 21:34:25 +00:00
image: jitsi/web:{{ services.jitsi_meet.version }}
restart: always
environment:
DISABLE_HTTPS: 1
PUBLIC_URL: "{{ services.jitsi_meet.domain }}"
2023-06-26 16:35:34 +00:00
ENABLE_AUTH: '1'
ENABLE_GUESTS: '1'
2023-04-20 21:34:25 +00:00
networks:
meet.jitsi:
services:
aliases:
- jitsi_meet
volumes:
2023-06-26 16:35:34 +00:00
- "{{ services.jitsi_meet.volume }}/web/transcripts:/usr/share/jitsi-meet/transcripts:rw"
2023-04-20 21:34:25 +00:00
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 }}"
2023-06-26 16:35:34 +00:00
ENABLE_AUTH: '1'
ENABLE_GUESTS: '1'
AUTH_TYPE: internal
2023-04-20 21:34:25 +00:00
networks:
meet.jitsi:
aliases:
- xmpp.meet.jitsi
volumes:
- "{{ services.jitsi_meet.volume }}/prosody/plugins:/prosody-plugins-custom:rw"
2023-06-26 16:35:34 +00:00
- "{{ services.jitsi_meet.volume }}/prosody/config:/config:rw"
2023-04-20 21:34:25 +00:00
expose:
- 5222
- 5280
- 5347
jicofo:
image: jitsi/jicofo:{{ services.jitsi_meet.version }}
restart: always
environment:
JICOFO_AUTH_PASSWORD: "{{ secrets.jitsi_meet.jicofo_auth_password }}"
2023-06-26 16:35:34 +00:00
ENABLE_AUTH: '1'
AUTH_TYPE: internal
2023-04-20 21:34:25 +00:00
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
2023-06-26 16:35:34 +00:00
- 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
2023-06-26 16:35:34 +00:00
not jitsi_meet_user.stat.exists