summaryrefslogtreecommitdiff
path: root/roles/apps/coturn/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/apps/coturn/tasks')
-rw-r--r--roles/apps/coturn/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/apps/coturn/tasks/main.yml b/roles/apps/coturn/tasks/main.yml
new file mode 100644
index 00000000..4631d1b7
--- /dev/null
+++ b/roles/apps/coturn/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- 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: generate pod manifests
+ template:
+ src: "pod.yml.j2"
+ dest: "/etc/kubernetes/manifests/coturn-{{ coturn_realm }}.yml"
+ mode: 0600