From e367a2d0de39e6602cae4b91dff9a39695ec66c0 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 18 Mar 2019 11:58:52 +0000 Subject: [PATCH] Add nulls for quotas as well --- roles/matrix-coturn/defaults/main.yml | 2 ++ roles/matrix-coturn/templates/turnserver.conf.j2 | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/matrix-coturn/defaults/main.yml b/roles/matrix-coturn/defaults/main.yml index a97f04a6e..5b7dbbe91 100644 --- a/roles/matrix-coturn/defaults/main.yml +++ b/roles/matrix-coturn/defaults/main.yml @@ -19,3 +19,5 @@ matrix_coturn_turn_udp_max_port: 49172 matrix_coturn_turn_external_ip_address: "{{ ansible_host }}" matrix_coturn_allowed_peer_ips: [] matrix_coturn_denied_peer_ips: [] +matrix_coturn_user_quota: null +matrix_coturn_total_quota: null diff --git a/roles/matrix-coturn/templates/turnserver.conf.j2 b/roles/matrix-coturn/templates/turnserver.conf.j2 index 9c4880fd8..a2689bc28 100644 --- a/roles/matrix-coturn/templates/turnserver.conf.j2 +++ b/roles/matrix-coturn/templates/turnserver.conf.j2 @@ -12,10 +12,10 @@ no-tls no-dtls prod no-tcp-relay -{% if matrix_coturn_user_quota is defined %} +{% if matrix_coturn_user_quota != None %} user-quota={{ matrix_coturn_user_quota }} {% endif %} -{% if matrix_coturn_total_quota is defined %} +{% if matrix_coturn_total_quota != None %} total-quota={{ matrix_coturn_total_quota }} {% endif %} {% for ip_range in matrix_coturn_denied_peer_ips %}