Skip to content

Commit 03b0e7d

Browse files
committed
fix: Enable and start livekit-sip if needed
1 parent 08d9ac6 commit 03b0e7d

File tree

4 files changed

+45
-26
lines changed

4 files changed

+45
-26
lines changed

tasks/configure-livekit.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
- name: Ensure livekit-sip service state
3+
when: bbb_livekit_enable
4+
become: true
5+
ansible.builtin.service:
6+
name: livekit-sip
7+
enabled: "{{ bbb_dialin_enable }}"
8+
state: "{{ bbb_dialin_enable | ternary('started', 'stopped') }}"

tasks/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@
2929
- import_tasks: mixin-fonts.yml
3030
- import_tasks: mixin-livekit.yml
3131

32-
# Configuration phase: Write or patch configuration files and notify handlers
33-
# if necessary.
32+
# Configuration phase: Write or patch configuration files and notify handlers if
33+
# necessary. Order is significant here.
3434

35-
- import_tasks: configure-bbb.yml
35+
- import_tasks: configure-bbb.yml # Should be the first one
3636
- import_tasks: configure-nginx.yml
3737
- import_tasks: configure-haproxy.yml # Depends on configure-nginx.yml
3838
- import_tasks: configure-freeswitch.yml
3939
- import_tasks: configure-coturn.yml
40+
- import_tasks: configure-livekit.yml
4041

4142
# Finalizing phase: Tasks that require a fully configured and running BBB server.
4243
# Handlers are flushed before entering this phase.

tasks/mixin-livekit.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
---
2-
- name: Update bbb-web for livekit
3-
when: bbb_livekit_enable
4-
ansible.builtin.set_fact:
5-
bbb_config_web_base: |
6-
{{bbb_config_web_base | combine({
7-
"audioBridge": "livekit",
8-
"cameraBridge": "livekit",
9-
"screenShareBridge": "livekit"
10-
})}}
2+
- when: bbb_livekit_enable
3+
block:
4+
- name: Update bbb-web for livekit
5+
ansible.builtin.set_fact:
6+
bbb_config_web_base: |
7+
{{bbb_config_web_base | combine({
8+
"audioBridge": "livekit",
9+
"cameraBridge": "livekit",
10+
"screenShareBridge": "livekit"
11+
})}}
1112
12-
- name: Update html5 for livekit
13-
when: bbb_livekit_enable and bbb_cluster_proxy is defined
14-
ansible.builtin.set_fact:
15-
bbb_config_html5_base: |
16-
{{bbb_config_html5_base | combine({
17-
'public': {
18-
'media': {
19-
'livekit': {
20-
'url': 'wss://'+bbb_hostname+'/livekit'
13+
- name: Update html5 for livekit
14+
when: bbb_cluster_proxy is defined
15+
ansible.builtin.set_fact:
16+
bbb_config_html5_base: |
17+
{{bbb_config_html5_base | combine({
18+
'public': {
19+
'media': {
20+
'livekit': {
21+
'url': 'wss://'+bbb_hostname+'/livekit'
22+
}
23+
}
2124
}
22-
}
23-
}
24-
}, recursive=True)}}
25+
}, recursive=True)}}
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
[Service]
1+
[Unit]
2+
{% if bbb_dialin_enable %}
3+
PartOf=bigbluebutton.target
4+
{% endif %}
25

6+
[Service]
37
{% if bbb_container_compat %}
48
IOSchedulingClass=
59
IOSchedulingPriority=
610
CPUSchedulingPolicy=
711
CPUSchedulingPriority=
8-
{% endif %}
12+
{% endif %}
13+
14+
[Install]
15+
{% if bbb_dialin_enable %}
16+
WantedBy=multi-user.target bigbluebutton.target
17+
{% endif %}

0 commit comments

Comments
 (0)