2020-03-16 20:18:59 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install coturn
|
2020-11-13 18:27:52 +01:00
|
|
|
apt: name=coturn
|
2020-03-16 20:18:59 +01:00
|
|
|
|
2022-01-27 21:12:28 +01:00
|
|
|
- name: Create coturn service override directory
|
|
|
|
file: path=/etc/systemd/system/coturn.service.d state=directory
|
|
|
|
|
|
|
|
- name: Configure coturn service override
|
|
|
|
template: src=coturn.override.j2 dest=/etc/systemd/system/coturn.service.d/override.conf
|
|
|
|
notify:
|
|
|
|
- Reload systemd
|
|
|
|
- Restart coturn
|
|
|
|
|
|
|
|
- name: Create gitea directories
|
|
|
|
file: path={{ item }} state=directory owner=turnserver
|
|
|
|
with_items:
|
|
|
|
- /etc/turnserver
|
|
|
|
- /etc/turnserver/certs
|
|
|
|
|
|
|
|
- name: Ensure certificates are available
|
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/turnserver/certs/{{ coturn_realm }}.key -out /etc/turnserver/certs/{{ coturn_realm }}.crt -days 730 -subj "/CN={{ coturn_realm }}" creates=/etc/turnserver/certs/{{ coturn_realm }}.crt
|
|
|
|
|
|
|
|
- name: Configure certificate manager
|
|
|
|
template: src=certs.j2 dest=/etc/acertmgr/{{ coturn_realm }}.conf
|
|
|
|
notify: Run acertmgr
|
|
|
|
|
2020-03-16 20:18:59 +01:00
|
|
|
- name: Configure coturn
|
|
|
|
template: src={{ item }}.j2 dest=/etc/{{ item }}
|
|
|
|
with_items:
|
|
|
|
- turnserver.conf
|
|
|
|
notify: Restart coturn
|