bbb: ajout du role pour un coturn externe

This commit is contained in:
Samuel Trégouët
2021-05-12 15:03:06 +00:00
committed by Antoine Ouvrard
parent 2bc9af1308
commit ca5a745557
7 changed files with 79 additions and 5 deletions
@@ -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