Parcourir la source

Add coturn playbook

master
Dryusdan il y a 6 mois
Parent
révision
4d366fd67a
3 fichiers modifiés avec 36 ajouts et 0 suppressions
  1. +28
    -0
      roles/coturn/tasks/main.yml
  2. +1
    -0
      roles/coturn/templates/coturn.j2
  3. +7
    -0
      roles/coturn/templates/turnserver.conf.j2

+ 28
- 0
roles/coturn/tasks/main.yml Voir le fichier

@@ -0,0 +1,28 @@
---
- name: Install coturn
apt:
name: "{{ packages }}"
vars:
packages:
- coturn

- name: Set template
template:
src: turnserver.conf.j2
dest: /etc/turnserver.conf
owner: root
group: root
mode: 0644

- name: Set template
template:
src: coturn.j2
dest: /etc/default/coturn
owner: root
group: root
mode: 0644

- name: Start servic if not started
service:
name: coturn
state: restarted

+ 1
- 0
roles/coturn/templates/coturn.j2 Voir le fichier

@@ -0,0 +1 @@
TURNSERVER_ENABLED=1

+ 7
- 0
roles/coturn/templates/turnserver.conf.j2 Voir le fichier

@@ -0,0 +1,7 @@
# Full conf : https://github.com/coturn/coturn/blob/master/examples/etc/turnserver.conf
listening-port={{ coturn.listening_port }}
use-auth-secret
static-auth-secret={{ coturn.static_auth_secret }}
server-name={{ coturn.server_name }}
realm={{ coturn.realm }}


Chargement…
Annuler
Enregistrer