infra/roles/coturn/tasks/coturn.yml

48 lines
928 B
YAML

---
- name: install certs (zerossl)
copy:
src: "private/zerossl/{{ coturn_url }}"
dest: "/usr/local/etc/certs/"
owner: root
group: root
mode: 0755
tags:
- zerossl-certs
notify: restart coturn
vars:
prediff_cmd: echo
# coturn isnt in the ubuntu 22.04 repos because of this bug:
# https://bugs.launchpad.net/ubuntu/+source/coturn/+bug/1967018
#
# using the ppa instead
- name: add ppa for coturn while its not in the main repos
apt_repository:
repo: 'ppa:ubuntuhandbook1/coturn'
state: present
- name: install coturn
apt:
name: coturn
state: latest
update_cache: true
notify: restart coturn
tags:
- packages
- name: template coturn config
template:
src: turnserver.conf.j2
dest: /etc/turnserver.conf
notify: restart coturn
- meta: flush_handlers
- name: enable and start coturn
service:
name: coturn
state: started
enabled: true