Skip to content

Commit da6977c

Browse files
committed
Factor out mod_authz_groupfile to its own class
This makes it easier to run with default mods disabled while still using this mod.
1 parent 0ba7da8 commit da6977c

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

manifests/default_mods.pp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@
157157
}
158158

159159
include apache::mod::authz_user
160-
161-
::apache::mod { 'authz_groupfile': }
160+
include apache::mod::authz_groupfile
162161
include apache::mod::env
163162
} elsif $mods {
164163
::apache::default_mods::load { $mods: }

manifests/mod/authz_groupfile.pp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# @summary
2+
# Installs `mod_authz_groupfile`
3+
#
4+
# @see https://httpd.apache.org/docs/current/mod/mod_authz_user.html for additional documentation.
5+
#
6+
class apache::mod::authz_groupfile {
7+
include apache
8+
apache::mod { 'authz_groupfile': }
9+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe 'apache::mod::authz_groupfile' do
6+
it_behaves_like 'a mod class, without including apache'
7+
8+
context 'default configuration with parameters' do
9+
context 'on a Debian OS' do
10+
include_examples 'Debian 11'
11+
12+
it { is_expected.to contain_apache__mod('authz_groupfile') }
13+
end
14+
end
15+
end

0 commit comments

Comments
 (0)