From 0f06f1be0260d635e2be22857b82cb00f588f461 Mon Sep 17 00:00:00 2001 From: Ramesh Sencha Date: Fri, 11 Aug 2023 13:42:50 +0530 Subject: [PATCH] (CAT-1283) - Enable forensic module --- manifests/default_mods.pp | 1 + manifests/mod/log_forensic.pp | 9 +++++++++ spec/classes/mod/log_forensic_spec.rb | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 manifests/mod/log_forensic.pp create mode 100644 spec/classes/mod/log_forensic_spec.rb diff --git a/manifests/default_mods.pp b/manifests/default_mods.pp index 42e2a44a5e..7463c0504f 100644 --- a/manifests/default_mods.pp +++ b/manifests/default_mods.pp @@ -125,6 +125,7 @@ include apache::mod::negotiation include apache::mod::setenvif include apache::mod::auth_basic + include apache::mod::log_forensic # filter is needed by mod_deflate include apache::mod::filter diff --git a/manifests/mod/log_forensic.pp b/manifests/mod/log_forensic.pp new file mode 100644 index 0000000000..df0f0dbddf --- /dev/null +++ b/manifests/mod/log_forensic.pp @@ -0,0 +1,9 @@ +# @summary +# Installs `mod_log_forensic` +# +# @see https://httpd.apache.org/docs/current/mod/mod_log_forensic.html for additional documentation. +# +class apache::mod::log_forensic { + include apache + apache::mod { 'log_forensic': } +} diff --git a/spec/classes/mod/log_forensic_spec.rb b/spec/classes/mod/log_forensic_spec.rb new file mode 100644 index 0000000000..e869a55ba6 --- /dev/null +++ b/spec/classes/mod/log_forensic_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'apache::mod::log_forensic', type: :class do + ['Debian 11', 'RedHat 8'].each do |os| + context "on a #{os} OS" do + include_examples os + + it { is_expected.to contain_class('apache::params') } + it { is_expected.to contain_class('apache::mod::log_forensic') } + it { is_expected.to contain_apache__mod('log_forensic') } + it { is_expected.to contain_file('log_forensic.load').with_content(%r{LoadModule log_forensic_module}) } + end + end +end