From 6d4bff4841c7a445d29a27f2dca740f03a539716 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 27 Jan 2017 03:31:10 +0100 Subject: [PATCH] library/roles/apache: Permit the removal of a list of modules. dnet-efg: Fixes. --- apache/tasks/apache-modules.yml | 8 +++++++- apache/tasks/apache.yml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apache/tasks/apache-modules.yml b/apache/tasks/apache-modules.yml index 7bc3f97d..39d2ce75 100644 --- a/apache/tasks/apache-modules.yml +++ b/apache/tasks/apache-modules.yml @@ -17,11 +17,17 @@ - name: Load additional apache modules if any apache2_module: name={{ item }} state=present - with_items: '{{ apache_additional_modules_list }}' + with_items: '{{ apache_additional_modules_list | default ([]) }}' when: apache_additional_modules notify: apache2 reload tags: [ 'apache', 'apache_mods' ] +- name: Disable apache modules if any + apache2_module: name={{ item }} state=absent + with_items: '{{ apache_modules_to_be_removed | default ([]) }}' + notify: apache2 reload + tags: [ 'apache', 'apache_mods' ] + - name: Load the apache status module apache2_module: name={{ item }} state=present with_items: status diff --git a/apache/tasks/apache.yml b/apache/tasks/apache.yml index daa22a5c..1ec4619e 100644 --- a/apache/tasks/apache.yml +++ b/apache/tasks/apache.yml @@ -15,6 +15,7 @@ with_items: '{{ apache_worker_modules }}' when: is_trusty notify: apache2 restart + ignore_errors: True tags: [ 'apache', 'apache_modules', 'apache_workers_modules' ] - name: Load the required modules