summaryrefslogtreecommitdiff
path: root/roles/apps/jitsi/meet/tasks/main.yml
blob: b433a90084bbe9fe51cd38ca8c7658f05e9f1c2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
- name: create jitsi-meet scripts subdirectories
  loop:
  - jicofo
  - prosody
  - web
  - jvb
  file:
    path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/{{ item }}"
    state: directory

- name: generate prosody cont-init.d script
  copy:
    content: |
      #!/usr/bin/with-contenv bash
      sed -e 's#^\(component_interface\s*=\)#-- \1#g' -i /config/prosody.cfg.lua
      {% if jitsi_meet_auth is defined %}

      echo "authentication enabled:"
      {%   for username, password in jitsi_meet_auth.users.items() %}
      echo " * registering user: {{ username }}"
      prosodyctl --config "/config/prosody.cfg.lua" register "{{ username }}" $XMPP_DOMAIN "{{ password }}"
      {%   endfor %}
      {% endif %}
    dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh"
    mode: 0750

- name: install pod manifest
  vars:
    kubernetes_standalone_pod:
      name: "jitsi-meet-{{ jitsi_meet_inst_name }}"
      spec: "{{ lookup('template', 'pod-spec.yml.j2') }}"
      mode: "0600"
      config_hash_items:
      - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh"
        properties:
        - checksum
  include_role:
    name: kubernetes/standalone/pod

## TODO: https://github.com/jitsi/jitsi-meet/blob/master/doc/turn.md

- name: configure nginx vhost
  vars:
    nginx_vhost:
      name: "jitsi-meet-{{ jitsi_meet_inst_name }}"
      template: generic-proxy-no-buffering-with-acme
      acme: true
      hostnames:
      - "{{ jitsi_meet_hostname }}"
      locations:
        '/':
          proxy_pass: "http://127.0.0.1:{{ jitsi_meet_http_port }}"
          extra_directives: |-
            client_max_body_size 0;
  include_role:
    name: nginx/vhost