blob: 29a87d6f5cb8e0ef3ad215f704b3d4c5c47db1ab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
---
- name: add group for coturn
group:
name: coturn
gid: "{{ coturn_gid }}"
- name: add user for coturn
user:
name: coturn
uid: "{{ coturn_uid }}"
group: coturn
password: "!"
- name: create coturn config subdirectory
file:
path: "{{ coturn_base_path }}/{{ coturn_realm }}/config"
state: directory
- name: create coturn config
template:
src: turnserver.conf.j2
dest: "{{ coturn_base_path }}/{{ coturn_realm }}/config/turnserver.conf"
group: coturn
mode: 0640
- name: create coturn ssl subdirectory
file:
path: "{{ coturn_base_path }}/{{ coturn_realm }}/config/ssl"
state: directory
owner: coturn
group: coturn
mode: 0700
- name: generate Diffie-Hellman parameters
openssl_dhparam:
path: "{{ coturn_base_path }}/{{ coturn_realm }}/config/ssl/dhparams.pem"
size: "{{ coturn_dhparam_size }}"
owner: coturn
group: coturn
- name: install acmetool hook script
template:
src: acmetool-reload.sh.j2
dest: "/etc/acme/hooks/coturn-{{ coturn_realm }}"
mode: 0755
- name: configure nginx vhost
vars:
nginx_vhost:
name: "coturn-{{ coturn_realm }}"
content: "{{ lookup('template', 'nginx-vhost.conf.j2') }}"
acme: true
hostnames: "{{ coturn_hostnames }}"
include_role:
name: nginx/vhost
- name: generate pod manifests
template:
src: "pod.yml.j2"
dest: "/etc/kubernetes/manifests/coturn-{{ coturn_realm }}.yml"
mode: 0600
|