From 91bd22d43692a1a1052a0b5ce55241af6c21f571 Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 28 Dec 2022 16:07:32 +0100 Subject: [PATCH] apache2: Aktiviere notwendige Module auf externen Hosts --- tasks/configuration.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tasks/configuration.yml b/tasks/configuration.yml index 82d5703..d2278c5 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -32,9 +32,20 @@ dest: /etc/apache2/conf-available/ssl.conf mode: 0644 +- name: "configuration | Aktiviere Module" + ansible.builtin.apache2_module: + name: "{{ item }}" + state: present + notify: reload apache2 + when: "'extern_hosts' in group_names" + loop: + - headers + - mpm_event + - ssl + - name: "configuration | Aktiviere Konfiguration" ansible.builtin.command: - cmd: "a2enmod {{ item }}" + cmd: "a2enconf {{ item }}" creates: "/etc/apache2/conf-enabled/{{ item }}" notify: reload apache2 when: "'extern_hosts' in group_names"