diff --git a/roles/coturn/tasks/main.yaml b/roles/coturn/tasks/main.yaml index 3c9002a..939e85c 100644 --- a/roles/coturn/tasks/main.yaml +++ b/roles/coturn/tasks/main.yaml @@ -1,4 +1,8 @@ --- +- name: 'alpine links' + file: path='/etc/init.d/coturn' src='turnserver' state='link' force=true + when: ansible_distribution == 'Alpine' + - name: 'install coturn' import_role: name='service' vars: @@ -57,4 +61,12 @@ notify: 'restart coturn' tags: - 'service_password' -... + +- name: 'alpine links' + file: path='/etc/coturn/turnserver.conf' src='../turnserver.conf' state='link' + when: ansible_distribution == 'Alpine' + notify: 'restart coturn' + +- name: 'alpine init fix 1' + lineinfile: path='/etc/init.d/turnserver' line='command_user=root' regexp='^command_user=' + notify: 'restart coturn' diff --git a/roles/coturn/templates/turnserver.conf.j2 b/roles/coturn/templates/turnserver.conf.j2 index 43bfe3f..34f1282 100644 --- a/roles/coturn/templates/turnserver.conf.j2 +++ b/roles/coturn/templates/turnserver.conf.j2 @@ -50,3 +50,7 @@ syslog #secure-stun no-cli +{% if ansible_distribution == 'Alpine' %} +proc-user=turnserver +proc-group=turnserver +{% endif %} \ No newline at end of file