From 33056865af61b4f24dfc133adba9f2ee8ad51834 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 10 Mar 2025 13:46:51 +0100 Subject: [PATCH] Install mod_http2 on EL if required In EL8 httpd had a hard requirement on mod_http2 but in EL9 it turned into a weak dependency. While most installs default to installing weak dependencies, it can be disabled by users. OracleLinux even defaults to disabled. EL7 doesn't have http2 at all so the whole class can't be used with it. --- manifests/params.pp | 1 + spec/classes/mod/http2_spec.rb | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/manifests/params.pp b/manifests/params.pp index be3fd6b24d..60318ef6aa 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -202,6 +202,7 @@ 'authnz_pam' => 'mod_authnz_pam', 'fcgid' => 'mod_fcgid', 'geoip' => 'mod_geoip', + 'http2' => 'mod_http2', 'intercept_form_submit' => 'mod_intercept_form_submit', 'ldap' => 'mod_ldap', 'lookup_identity' => 'mod_lookup_identity', diff --git a/spec/classes/mod/http2_spec.rb b/spec/classes/mod/http2_spec.rb index 3046914d06..54130e36c7 100644 --- a/spec/classes/mod/http2_spec.rb +++ b/spec/classes/mod/http2_spec.rb @@ -85,4 +85,11 @@ it { is_expected.to contain_file('http2.conf').with(content: expected_content) } end end + + context 'on Red Hat 8' do + include_examples 'RedHat 8' do + it { is_expected.to contain_class('apache::mod::http2') } + it { is_expected.to contain_package('mod_http2') } + end + end end