diff --git a/README.md b/README.md index 02932ff34..3b71c5baa 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ * [Class: apache::mod::negotiation](#class-apachemodnegotiation) * [Class: apache::mod::deflate](#class-apachemoddeflate) * [Class: apache::mod::reqtimeout](#class-apachemodreqtimeout) + * [Class: apache::mod::version](#class-apachemodversion) * [Defined Type: apache::vhost](#defined-type-apachevhost) * [Parameter: `directories` for apache::vhost](#parameter-directories-for-apachevhost) * [SSL parameters for apache::vhost](#ssl-parameters-for-apachevhost) @@ -823,6 +824,15 @@ mod_reqtimeout configuration. } ``` +####Class: `apache::mod::reqtimeout` + +This wrapper around mod_version warns on Debian and Ubuntu systems with Apache httpd 2.4 +about loading mod_version, as on these platforms it's already built-in. + +```puppet + include '::apache::mod::version' +``` + #####`timeouts` A string or an array that sets the `RequestReadTimeout` option. Defaults to diff --git a/manifests/default_mods.pp b/manifests/default_mods.pp index 7e8381f03..71759030b 100644 --- a/manifests/default_mods.pp +++ b/manifests/default_mods.pp @@ -36,10 +36,11 @@ include ::apache::mod::cache include ::apache::mod::mime include ::apache::mod::mime_magic - include ::apache::mod::vhost_alias - include ::apache::mod::suexec include ::apache::mod::rewrite include ::apache::mod::speling + include ::apache::mod::suexec + include ::apache::mod::version + include ::apache::mod::vhost_alias ::apache::mod { 'auth_digest': } ::apache::mod { 'authn_anon': } ::apache::mod { 'authn_dbm': } @@ -51,7 +52,6 @@ ::apache::mod { 'logio': } ::apache::mod { 'substitute': } ::apache::mod { 'usertrack': } - ::apache::mod { 'version': } if versioncmp($apache_version, '2.4') >= 0 { ::apache::mod { 'authn_core': } @@ -71,6 +71,7 @@ include ::apache::mod::reqtimeout include ::apache::mod::rewrite include ::apache::mod::userdir + include ::apache::mod::version include ::apache::mod::vhost_alias include ::apache::mod::speling @@ -93,7 +94,6 @@ ::apache::mod { 'logio': } ::apache::mod { 'unique_id': } ::apache::mod { 'usertrack': } - ::apache::mod { 'version': } } default: {} } diff --git a/manifests/mod/version.pp b/manifests/mod/version.pp new file mode 100644 index 000000000..c0e405686 --- /dev/null +++ b/manifests/mod/version.pp @@ -0,0 +1,8 @@ +class apache::mod::version { + + if ($::osfamily == 'debian' and versioncmp($apache_version, '2.4') >= 0) { + warning("${module_name}: module version_module is built-in and can't be loaded") + } else { + ::apache::mod { 'version': } + } +}