Skip to content

Commit

Permalink
Introduce an authz_core mod class
Browse files Browse the repository at this point in the history
This removes duplication in default mods and makes it easy to use
without default mods.
  • Loading branch information
ekohl committed Jan 16, 2023
1 parent 210f319 commit a678f3d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
16 changes: 3 additions & 13 deletions manifests/default_mods.pp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
}
include apache::mod::alias
include apache::mod::authn_file
include apache::mod::authz_core
include apache::mod::autoindex
include apache::mod::dav
include apache::mod::dav_fs
Expand All @@ -124,11 +125,6 @@
include apache::mod::setenvif
include apache::mod::auth_basic

# authz_core is needed for 'Require' directive
::apache::mod { 'authz_core':
id => 'authz_core_module',
}

# lots of stuff seems to break without access_compat
::apache::mod { 'access_compat': }

Expand All @@ -138,14 +134,8 @@
} elsif $mods {
::apache::default_mods::load { $mods: }

# authz_core is needed for 'Require' directive
::apache::mod { 'authz_core':
id => 'authz_core_module',
}
include apache::mod::authz_core
} else {
# authz_core is needed for 'Require' directive
::apache::mod { 'authz_core':
id => 'authz_core_module',
}
include apache::mod::authz_core
}
}
13 changes: 13 additions & 0 deletions manifests/mod/authz_core.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# @summary
# Installs `mod_authz_core`.
#
# @param apache_version
# The version of apache being run.
#
# @see https://httpd.apache.org/docs/current/mod/mod_authz_core.html for additional documentation.
#
class apache::mod::authz_core {
apache::mod { 'authz_core':
id => 'authz_core_module',
}
}

0 comments on commit a678f3d

Please sign in to comment.