From fde5fef8b389b0d6a98b61914712f8e3f52d4676 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 14 Sep 2022 20:44:35 +0300 Subject: [PATCH] Fix Cactus Comments nginx injection when matrix-nginx-proxy disabled Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2101 Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2089 --- roles/matrix-cactus-comments/tasks/init.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/matrix-cactus-comments/tasks/init.yml b/roles/matrix-cactus-comments/tasks/init.yml index 78cdd319d..9a15cf89b 100644 --- a/roles/matrix-cactus-comments/tasks/init.yml +++ b/roles/matrix-cactus-comments/tasks/init.yml @@ -35,17 +35,18 @@ ansible.builtin.set_fact: matrix_nginx_proxy_container_additional_volumes: > {{ - matrix_nginx_proxy_container_additional_volumes | default([]) + matrix_nginx_proxy_container_additional_volumes | default([]) + [{"src": "{{ matrix_cactus_comments_client_path }}", "dst": "/cactus-comments/cactus-comments", "options": "ro"}] }} + - name: Generate Cactus Comment proxying configuration for matrix-nginx-proxy ansible.builtin.set_fact: matrix_cactus_comments_nginx_proxy_configuration: | location {{ matrix_cactus_comments_client_endpoint }} { root {{ matrix_cactus_comments_client_nginx_path }}; } - when: "matrix_nginx_proxy_enabled | default(False) | bool" + - name: Register Cactus Comment proxying configuration with matrix-nginx-proxy ansible.builtin.set_fact: matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks: | @@ -54,6 +55,7 @@ + [matrix_cactus_comments_nginx_proxy_configuration] }} + - name: Warn about reverse-proxying if matrix-nginx-proxy not used ansible.builtin.debug: msg: >-