Merge branch 'bbb-coturn' into 'master'

bbb: ajout du role pour un coturn externe

See merge request 10031/visio!20
This commit is contained in:
Antoine Ouvrard
2021-05-12 15:03:07 +00:00
7 changed files with 79 additions and 5 deletions
+2
View File
@@ -3,3 +3,5 @@ bbb_sip_provider: sip5.ovh.fr
bbb_sip_telnum_for_user: 0972551042
bbb_sip_username: 0033972551042
bbb_sip_password: "{{ vault_bbb_sip_password }}"
coturn_hostname: origan.champs-libres.be
coturn_secret: "{{ vault_coturn_secret }}"
+1
View File
@@ -37,6 +37,7 @@
- role: bbb-enable-metrics
- role: bbb-disable-test-echo
- role: bbb-enable-sip
- role: bbb-enable-external-coturn
tags:
- komki.bbb
@@ -0,0 +1,3 @@
---
- name: restart bigbluebutton
command: bbb-conf --restart
@@ -0,0 +1,68 @@
---
- name: vérification des variables obligatoire
fail:
msg: |
il faut définir les variables `coturn_hostname` et
`coturn_secret` pour utiliser ce role
when: (coturn_secret is not defined) or
(coturn_hostname is not defined)
- name: ajout du server turn
blockinfile:
path: /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
marker: "<!-- {mark} ANSIBLE MANAGED turn1 -->"
# yamllint disable-line rule:line-length
insertbefore: ' <bean id="stunTurnService" class="org.bigbluebutton.web.services.turn.StunTurnService">'
block: |
<bean id="turn1" class="org.bigbluebutton.web.services.turn.TurnServer">
<constructor-arg index="0" value="{{ coturn_secret }}"/>
<constructor-arg index="1" value="turn:{{ coturn_hostname }}:443?transport=tcp"/>
<constructor-arg index="2" value="86400"/>
</bean>
notify:
- restart bigbluebutton
- name: ajout du server turns
blockinfile:
path: /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
marker: "<!-- {mark} ANSIBLE MANAGED turn2 -->"
# yamllint disable-line rule:line-length
insertbefore: ' <bean id="stunTurnService" class="org.bigbluebutton.web.services.turn.StunTurnService">'
block: |
<bean id="turn2" class="org.bigbluebutton.web.services.turn.TurnServer">
<constructor-arg index="0" value="{{ coturn_secret }}"/>
<constructor-arg index="1" value="turns:{{ coturn_hostname }}:443?transport=tcp"/>
<constructor-arg index="2" value="86400"/>
</bean>
notify:
- restart bigbluebutton
- name: ajout du server stun
lineinfile:
path: /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
# yamllint disable-line rule:line-length
regexp: ' <constructor-arg index="0" value="stun:stun.freeswitch.org"/>'
# yamllint disable-line rule:line-length
line: ' <constructor-arg index="0" value="stun:{{ coturn_hostname }}"/>'
notify:
- restart bigbluebutton
- name: activation du server turn
lineinfile:
path: /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
# yamllint disable-line rule:line-length
regexp: ' <!--ref bean="turn1" /-->'
# yamllint disable-line rule:line-length
line: ' <ref bean="turn1" />'
notify:
- restart bigbluebutton
- name: activation du server turns
lineinfile:
path: /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
# yamllint disable-line rule:line-length
regexp: ' <!--ref bean="turn2" /-->'
# yamllint disable-line rule:line-length
line: ' <ref bean="turn2" />'
notify:
- restart bigbluebutton
+2 -2
View File
@@ -24,13 +24,13 @@
## Instalation des metrics BBB
- name: Ajout du script python qui met en forme les metrics BBB
file:
copy:
src: bbb-telegraf.py
dest: /opt/
mode: u=rwx,g=rx,o=rx
- name: Application de la conf BBB pour Telegraf
file:
copy:
src: telegraf-input-bbb.conf
dest: /etc/telegraf/telegraf.d/jitsi.conf
mode: u=rw,g=r,o=r
+1 -1
View File
@@ -10,7 +10,7 @@
- restart freeswitch
- name: Application de la conf SIP
file:
copy:
src: bbb_sip_ovh.xml
dest: /opt/freeswitch/conf/dialplan/public/bbb_sip_ovh.xml
mode: u=rw,g=r,o=r