From 05a507a07b398f935187e8265974d0e82d0e77d2 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 14 Aug 2023 23:56:09 +0200 Subject: coturn: move to generic nginx-vhost template --- inventory/host_vars/ele-coturn.yml | 1 + inventory/host_vars/glt-coturn.yml | 1 + inventory/host_vars/sk-cloudio/vars.yml | 1 + roles/apps/coturn/tasks/main.yml | 5 ++++- roles/apps/coturn/templates/nginx-vhost.conf.j2 | 27 ------------------------- 5 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 roles/apps/coturn/templates/nginx-vhost.conf.j2 diff --git a/inventory/host_vars/ele-coturn.yml b/inventory/host_vars/ele-coturn.yml index 28314433..ad865e1c 100644 --- a/inventory/host_vars/ele-coturn.yml +++ b/inventory/host_vars/ele-coturn.yml @@ -30,6 +30,7 @@ kubernetes_version: 1.27.3 kubernetes_cri_tools_pkg_version: 1.26.0-00 kubernetes_container_runtime: docker kubernetes_standalone_max_pods: 100 +kubernetes_standalone_pod_cidr: 192.168.255.0/24 kubernetes_standalone_cni_variant: with-portmap diff --git a/inventory/host_vars/glt-coturn.yml b/inventory/host_vars/glt-coturn.yml index 7dbcca04..c0bcbb0f 100644 --- a/inventory/host_vars/glt-coturn.yml +++ b/inventory/host_vars/glt-coturn.yml @@ -21,6 +21,7 @@ kubernetes_version: 1.27.3 kubernetes_cri_tools_pkg_version: 1.26.0-00 kubernetes_container_runtime: docker kubernetes_standalone_max_pods: 100 +kubernetes_standalone_pod_cidr: 192.168.255.0/24 kubernetes_standalone_cni_variant: with-portmap diff --git a/inventory/host_vars/sk-cloudio/vars.yml b/inventory/host_vars/sk-cloudio/vars.yml index 69f68e88..9165699e 100644 --- a/inventory/host_vars/sk-cloudio/vars.yml +++ b/inventory/host_vars/sk-cloudio/vars.yml @@ -74,6 +74,7 @@ kubernetes_version: 1.27.3 kubernetes_cri_tools_pkg_version: 1.26.0-00 kubernetes_container_runtime: docker kubernetes_standalone_max_pods: 100 +kubernetes_standalone_pod_cidr: 192.168.255.0/24 kubernetes_standalone_cni_variant: with-portmap kubernetes_standalone_local_services_tcp: diff --git a/roles/apps/coturn/tasks/main.yml b/roles/apps/coturn/tasks/main.yml index bab53d99..ed0c06ab 100644 --- a/roles/apps/coturn/tasks/main.yml +++ b/roles/apps/coturn/tasks/main.yml @@ -69,10 +69,13 @@ vars: nginx_vhost: name: "coturn-{{ coturn_realm }}" - content: "{{ lookup('template', 'nginx-vhost.conf.j2') }}" + template: generic tls: certificate_provider: acmetool hostnames: "{{ coturn_hostnames }}" + locations: + '/': + return: "404" include_role: name: nginx/vhost diff --git a/roles/apps/coturn/templates/nginx-vhost.conf.j2 b/roles/apps/coturn/templates/nginx-vhost.conf.j2 deleted file mode 100644 index 577c33b4..00000000 --- a/roles/apps/coturn/templates/nginx-vhost.conf.j2 +++ /dev/null @@ -1,27 +0,0 @@ -server { - listen 80; - listen [::]:80; - server_name {{ coturn_hostnames | join(' ') }}; - - include snippets/acmetool.conf; - - location / { - return 301 https://$host$request_uri; - } -} - -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name {{ coturn_hostnames | join(' ') }}; - - include snippets/acmetool.conf; - include snippets/tls.conf; - ssl_certificate {{ x509_certificate_path_fullchain }}; - ssl_certificate_key {{ x509_certificate_path_key }}; - include snippets/hsts.conf; - - location / { - return 404; - } -} -- cgit v1.2.3