Skip to content

Commit

Permalink
MODULES-1446: mod_version is now builtin
Browse files Browse the repository at this point in the history
while we are not loading it (by default), we should make it easier for
people transitioning their configuration from 2.2 to 2.4 to find issues:
thus adding a warning when someone tries to load mod_version.

---

things i have learned during this pr:

× @hunner: There is no '&&' in puppet; only 'and'*

× add puppet to PATH, so vim can check syntax. thanks @mhaskel
especially for the patience.

*zuhl.
  • Loading branch information
igalic authored and Morgan Haskel committed Nov 7, 2014
1 parent dda1b80 commit 1f531b3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions manifests/default_mods.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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': }
Expand All @@ -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': }
Expand All @@ -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

Expand All @@ -93,7 +94,6 @@
::apache::mod { 'logio': }
::apache::mod { 'unique_id': }
::apache::mod { 'usertrack': }
::apache::mod { 'version': }
}
default: {}
}
Expand Down
8 changes: 8 additions & 0 deletions manifests/mod/version.pp
Original file line number Diff line number Diff line change
@@ -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': }
}
}

0 comments on commit 1f531b3

Please sign in to comment.