diff --git a/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml b/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml index 270c3bfa1..8a4b1029a 100644 --- a/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml +++ b/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml @@ -62,7 +62,7 @@ src: "{{ role_path }}/templates/cron.d/matrix-nginx-proxy-periodic-restarter.j2" dest: "/etc/cron.d/matrix-nginx-proxy-periodic-restarter" mode: 0600 - when: matrix_nginx_proxy_enabled + when: "matrix_nginx_proxy_enabled and matrix_ssl_retrieval_method == 'lets-encrypt'" # # Tasks related to getting rid of matrix-nginx-proxy (if it was previously enabled) @@ -87,4 +87,4 @@ file: path: "/etc/cron.d/matrix-nginx-proxy-periodic-restarter" state: absent - when: "not matrix_nginx_proxy_enabled" + when: "not matrix_nginx_proxy_enabled or matrix_ssl_retrieval_method != 'lets-encrypt'" diff --git a/roles/matrix-server/tasks/setup/ssl/setup_ssl_lets_encrypt.yml b/roles/matrix-server/tasks/setup/ssl/setup_ssl_lets_encrypt.yml index 2836e5959..e7fcd94ca 100644 --- a/roles/matrix-server/tasks/setup/ssl/setup_ssl_lets_encrypt.yml +++ b/roles/matrix-server/tasks/setup/ssl/setup_ssl_lets_encrypt.yml @@ -4,6 +4,8 @@ # Tasks related to setting up Let's Encrypt's management of certificates # +- debug: var="matrix_ssl_retrieval_method" + - name: (Deprecation) Fail if using outdated configuration fail: msg: "You're using the `host_specific_matrix_ssl_support_email` variable, which has been superseded by `host_specific_matrix_ssl_lets_encrypt_support_email`. Please change your configuration to use the new name!"