From f721c9fde198c3eed5eaee8bdb008fc65e8ad242 Mon Sep 17 00:00:00 2001 From: Faris AL-Otaibi Date: Fri, 23 Aug 2024 22:26:55 +0300 Subject: [PATCH] Fix mpm conflict issue in disable apache mods --- tasks/configure-Debian.yml | 14 +++++++------- tasks/configure-RedHat.yml | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tasks/configure-Debian.yml b/tasks/configure-Debian.yml index d55a957..7bb8428 100644 --- a/tasks/configure-Debian.yml +++ b/tasks/configure-Debian.yml @@ -9,6 +9,13 @@ with_items: "{{ apache_ports_configuration_items }}" notify: restart apache +- name: Disable Apache mods. + file: + path: "{{ apache_server_root }}/mods-enabled/{{ item }}.load" + state: absent + with_items: "{{ apache_mods_disabled }}" + notify: restart apache + - name: Enable Apache mods. file: src: "{{ apache_server_root }}/mods-available/{{ item }}.load" @@ -18,13 +25,6 @@ with_items: "{{ apache_mods_enabled }}" notify: restart apache -- name: Disable Apache mods. - file: - path: "{{ apache_server_root }}/mods-enabled/{{ item }}.load" - state: absent - with_items: "{{ apache_mods_disabled }}" - notify: restart apache - - name: Check whether certificates defined in vhosts exist. stat: "path={{ item.certificate_file }}" register: apache_ssl_certificates diff --git a/tasks/configure-RedHat.yml b/tasks/configure-RedHat.yml index 6a46980..c3ca709 100644 --- a/tasks/configure-RedHat.yml +++ b/tasks/configure-RedHat.yml @@ -15,6 +15,13 @@ with_items: "{{ apache_vhosts_ssl }}" no_log: "{{ apache_ssl_no_log }}" +- name: Disable Apache mods + file: + path: "{{ apache_server_root }}/conf.modules.d/99-ansible-{{ item }}.conf" + state: absent + with_items: "{{ apache_mods_disabled }}" + notify: restart apache + - name: Enable Apache mods. copy: dest: "{{ apache_server_root }}/conf.modules.d/99-ansible-{{ item }}.conf" @@ -24,13 +31,6 @@ with_items: "{{ apache_mods_enabled }}" notify: restart apache -- name: Disable Apache mods - file: - path: "{{ apache_server_root }}/conf.modules.d/99-ansible-{{ item }}.conf" - state: absent - with_items: "{{ apache_mods_disabled }}" - notify: restart apache - - name: Add apache vhosts configuration. template: src: "{{ apache_vhosts_template }}"