Run taks only when host_var is enabled

This commit is contained in:
phil 2023-02-06 22:51:00 +01:00
parent 6ff025d4b7
commit ef238e83df

View file

@ -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