Skip to content

Commit 749b223

Browse files
committed
Merge pull request #1118 from sathieu/authn_core
Move mod_authn_core to a class
2 parents 421adf5 + 6f36686 commit 749b223

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ There are many `apache::mod::[name]` classes within this module that can be decl
560560
* `auth_basic`
561561
* `auth_cas`* (see [`apache::mod::auth_cas`](#class-apachemodauthcas) below)
562562
* `auth_kerb`
563+
* `authn_core`
563564
* `authn_file`
564565
* `authnz_ldap`*
565566
* `authz_default`

manifests/default_mods.pp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,12 @@
3737
if $all {
3838
case $::osfamily {
3939
'debian': {
40+
include ::apache::mod::authn_core
4041
include ::apache::mod::reqtimeout
41-
if versioncmp($apache_version, '2.4') >= 0 {
42-
::apache::mod { 'authn_core': }
43-
}
4442
}
4543
'redhat': {
4644
include ::apache::mod::actions
45+
include ::apache::mod::authn_core
4746
include ::apache::mod::cache
4847
include ::apache::mod::mime
4948
include ::apache::mod::mime_magic
@@ -64,16 +63,14 @@
6463
::apache::mod { 'substitute': }
6564
::apache::mod { 'usertrack': }
6665

67-
if versioncmp($apache_version, '2.4') >= 0 {
68-
::apache::mod { 'authn_core': }
69-
}
70-
else {
66+
if versioncmp($apache_version, '2.4') < 0 {
7167
::apache::mod { 'authn_alias': }
7268
::apache::mod { 'authn_default': }
7369
}
7470
}
7571
'freebsd': {
7672
include ::apache::mod::actions
73+
include ::apache::mod::authn_core
7774
include ::apache::mod::cache
7875
include ::apache::mod::disk_cache
7976
include ::apache::mod::headers
@@ -91,7 +88,6 @@
9188
::apache::mod { 'auth_digest': }
9289
::apache::mod { 'auth_form': }
9390
::apache::mod { 'authn_anon': }
94-
::apache::mod { 'authn_core': }
9591
::apache::mod { 'authn_dbm': }
9692
::apache::mod { 'authn_socache': }
9793
::apache::mod { 'authz_dbd': }

manifests/mod/authn_core.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class apache::mod::authn_core(
2+
$apache_version = $::apache::apache_version
3+
) {
4+
if versioncmp($apache_version, '2.4') >= 0 {
5+
::apache::mod { 'authn_core': }
6+
}
7+
}

spec/classes/apache_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@
677677
# Assert that load files are placed for these mods, but no conf file.
678678
[
679679
'auth_basic',
680+
'authn_core',
680681
'authn_file',
681682
'authz_groupfile',
682683
'authz_host',

0 commit comments

Comments
 (0)