Implemented SSL_ENABLED

This commit is contained in:
2025-12-04 10:48:45 +01:00
parent a731b5cd4b
commit fc0bdbea9a
6 changed files with 11 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
{% if SSL_ENABLED | bool %}
listen {{ WEB_PORT }} ssl http2;
listen [::]:{{ WEB_PORT }} ssl http2;
@@ -12,4 +13,8 @@ ssl_session_tickets on;
add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;
{% include 'roles/sys-svc-letsencrypt/templates/ssl_credentials.j2' %}
{% include 'roles/sys-svc-letsencrypt/templates/ssl_credentials.j2' %}
{% else %}
listen {{ WEB_PORT }};
listen [::]:{{ WEB_PORT }};
{% endif %}

View File

@@ -7,3 +7,4 @@
- name: "include role sys-svc-certs for '{{ domain }}'"
include_role:
name: sys-svc-certs
when: SSL_ENABLED | bool

View File

@@ -35,6 +35,7 @@
- name: "Include Cert deploy service for '{{ role_name }}'"
include_role:
name: sys-ctl-mtn-cert-deploy
when: SSL_ENABLED | bool
- name: "Flush Docker Compose handlers"
meta: flush_handlers

View File

@@ -22,6 +22,7 @@
vars:
domain: "{{ MATRIX_SYNAPSE_DOMAIN }}"
http_port: "{{ MATRIX_SYNAPSE_PORT }}"
when: SSL_ENABLED | bool
- name: create {{ MATRIX_SYNAPSE_DOMAIN }}.conf
template:

View File

@@ -1,6 +1,7 @@
- name: "include role for {{ application_id }} to receive certs & do modification routines"
include_role:
name: sys-util-csp-cert
when: SSL_ENABLED | bool
- name: configure {{ domain }}.conf
template:

View File

@@ -1,6 +1,7 @@
- name: "include task receive certbot certificate"
include_role:
name: sys-svc-certs
when: SSL_ENABLED | bool
- name: "Deploying NGINX redirect configuration for '{{ domain }}'"
template: