diff --git a/files/override.conf b/files/override.conf deleted file mode 100644 index f3c503b..0000000 --- a/files/override.conf +++ /dev/null @@ -1,6 +0,0 @@ -[Service] -LimitNOFILE=1048576 -AmbientCapabilities=CAP_NET_BIND_SERVICE -ExecStart= -ExecStart=/usr/bin/turnserver --daemon -c /etc/turnserver.conf -Restart=always \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 8c5c6d7..a7edee4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -29,7 +29,7 @@ state: directory mode: "0755" - name: Copy coturn systemd override file - ansible.builtin.copy: + ansible.builtin.template: src: override.conf dest: /etc/systemd/system/coturn.service.d/override.conf owner: root @@ -74,8 +74,8 @@ ansible.builtin.copy: src: dhparam.pem dest: /etc/ssl/dhparam.pem - owner: root - group: root + owner: "{{ turn_user }}" + group: "{{ turn_user }}" mode: "0644" - name: Create lograte structure diff --git a/templates/override.conf b/templates/override.conf new file mode 100644 index 0000000..6c060a4 --- /dev/null +++ b/templates/override.conf @@ -0,0 +1,6 @@ +[Service] +LimitNOFILE=1048576 +AmbientCapabilities=CAP_NET_BIND_SERVICE +ExecStart= +ExecStart=/usr/bin/turnserver -c /etc/turnserver.conf --pidfile /run/{{ turn_user }}/turnserver.pid --no-stdout-log +Restart=always \ No newline at end of file