|
3 | 3 | # |
4 | 4 | # @api private |
5 | 5 | class apache::default_mods ( |
6 | | - $all = true, |
7 | | - $mods = undef, |
8 | | - $apache_version = $apache::apache_version, |
9 | | - $use_systemd = $apache::use_systemd, |
| 6 | + Boolean $all = true, |
| 7 | + Optional[Variant[Array[String],String]] $mods = undef, |
| 8 | + String $apache_version = $apache::apache_version, |
| 9 | + Boolean $use_systemd = $apache::use_systemd, |
10 | 10 | ) { |
11 | 11 | # These are modules required to run the default configuration. |
12 | 12 | # They are not configurable at this time, so we just include |
13 | 13 | # them to make sure it works. |
14 | | - case $::osfamily { |
| 14 | + case $facts['os']['family'] { |
15 | 15 | 'redhat': { |
16 | 16 | ::apache::mod { 'log_config': } |
17 | 17 | if versioncmp($apache_version, '2.4') >= 0 { |
18 | 18 | # Lets fork it |
19 | 19 | # Do not try to load mod_systemd on RHEL/CentOS 6 SCL. |
20 | | - if ( !($::osfamily == 'redhat' and versioncmp($::operatingsystemmajrelease, '7') == -1) and !($::operatingsystem == 'Amazon') ) { |
| 20 | + if ( !($facts['os']['family'] == 'redhat' and versioncmp($facts['os']['release']['major'], '7') == -1) and !($facts['os']['name'] == 'Amazon') ) { |
21 | 21 | if ($use_systemd) { |
22 | 22 | ::apache::mod { 'systemd': } |
23 | 23 | } |
24 | 24 | } |
25 | | - if ($::operatingsystem == 'Amazon' and $::operatingsystemrelease == '2') { |
| 25 | + if ($facts['os']['name'] == 'Amazon' and $facts['os']['release']['full'] == '2') { |
26 | 26 | ::apache::mod { 'systemd': } |
27 | 27 | } |
28 | 28 | ::apache::mod { 'unixd': } |
|
37 | 37 | } |
38 | 38 | default: {} |
39 | 39 | } |
40 | | - case $::osfamily { |
| 40 | + case $facts['os']['family'] { |
41 | 41 | 'gentoo': {} |
42 | 42 | default: { |
43 | 43 | ::apache::mod { 'authz_host': } |
44 | 44 | } |
45 | 45 | } |
46 | 46 | # The rest of the modules only get loaded if we want all modules enabled |
47 | 47 | if $all { |
48 | | - case $::osfamily { |
| 48 | + case $facts['os']['family'] { |
49 | 49 | 'debian': { |
50 | 50 | include apache::mod::authn_core |
51 | 51 | include apache::mod::reqtimeout |
|
0 commit comments