From ef238e83df55a2f40dd90b75b3f81f757229cbd8 Mon Sep 17 00:00:00 2001 From: phil Date: Mon, 6 Feb 2023 22:51:00 +0100 Subject: [PATCH] Run taks only when host_var is enabled --- tasks/configuration.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/configuration.yml b/tasks/configuration.yml index 2af0cf9..29d5b4b 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -18,7 +18,7 @@ # Most of our apache2 instances are currently running behind public reverse proxies. # Thus, they do not offer HTTPS and do not need DH parameters. # The only possible exceptions are external hosts (e.g. orwell). - when: "'extern_hosts' in group_names" + when: apache.is_proxy is defined and apache.is_proxy - name: "Configuration | Copy misc configuration files" ansible.builtin.copy: @@ -44,7 +44,7 @@ name: "{{ item }}" state: present notify: reload apache2 - when: "'extern_hosts' in group_names" + when: apache.is_proxy is defined and apache.is_proxy loop: - headers - mpm_event @@ -55,7 +55,7 @@ cmd: "a2enconf {{ item }}" creates: "/etc/apache2/conf-enabled/{{ item }}" notify: reload apache2 - when: "'extern_hosts' in group_names" + when: apache.is_proxy is defined and apache.is_proxy loop: - add-headers.conf - letsencrypt.conf