Skip to content

Commit f618243

Browse files
authored
Merge pull request #2387 from david22swan/bugfix/facter_case_fix
(BUGFIX) Update to ensure correct facter comparisons
2 parents 04d7b51 + 290e096 commit f618243

File tree

15 files changed

+39
-39
lines changed

15 files changed

+39
-39
lines changed

manifests/default_confd_files.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# The rest of the conf.d/* files only get loaded if we want them
99
if $all {
1010
case $facts['os']['family'] {
11-
'freebsd': {
11+
'FreeBSD': {
1212
include apache::confd::no_accf
1313
}
1414
default: {

manifests/default_mods.pp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# They are not configurable at this time, so we just include
1212
# them to make sure it works.
1313
case $facts['os']['family'] {
14-
'redhat': {
14+
'RedHat': {
1515
::apache::mod { 'log_config': }
1616
if $facts['os']['name'] != 'Amazon' and $use_systemd {
1717
::apache::mod { 'systemd': }
@@ -21,7 +21,7 @@
2121
}
2222
::apache::mod { 'unixd': }
2323
}
24-
'freebsd': {
24+
'FreeBSD': {
2525
::apache::mod { 'log_config': }
2626
::apache::mod { 'unixd': }
2727
}
@@ -31,19 +31,19 @@
3131
default: {}
3232
}
3333
case $facts['os']['family'] {
34-
'gentoo': {}
34+
'Gentoo': {}
3535
default: {
3636
::apache::mod { 'authz_host': }
3737
}
3838
}
3939
# The rest of the modules only get loaded if we want all modules enabled
4040
if $all {
4141
case $facts['os']['family'] {
42-
'debian': {
42+
'Debian': {
4343
include apache::mod::authn_core
4444
include apache::mod::reqtimeout
4545
}
46-
'redhat': {
46+
'RedHat': {
4747
include apache::mod::actions
4848
include apache::mod::authn_core
4949
include apache::mod::cache
@@ -66,7 +66,7 @@
6666
::apache::mod { 'substitute': }
6767
::apache::mod { 'usertrack': }
6868
}
69-
'freebsd': {
69+
'FreeBSD': {
7070
include apache::mod::actions
7171
include apache::mod::authn_core
7272
include apache::mod::cache

manifests/init.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@
546546
Optional[Boolean] $protocols_honor_order = undef,
547547
) inherits apache::params {
548548
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7' {
549-
# On redhat 7 the ssl.conf lives in /etc/httpd/conf.d (the confd_dir)
549+
# On RedHat 7 the ssl.conf lives in /etc/httpd/conf.d (the confd_dir)
550550
# when all other module configs live in /etc/httpd/conf.modules.d (the
551551
# mod_dir). On all other platforms and versions, ssl.conf lives in the
552552
# mod_dir. This should maintain the expected location of ssl.conf
@@ -731,7 +731,7 @@
731731
}
732732

733733
if $apache::conf_dir and $apache::params::conf_file {
734-
if $facts['os']['family'] == 'gentoo' {
734+
if $facts['os']['family'] == 'Gentoo' {
735735
$error_documents_path = '/usr/share/apache2/error'
736736
if $default_mods =~ Array {
737737
if defined('apache::mod::ssl') {
@@ -755,7 +755,7 @@
755755
}
756756

757757
$apxs_workaround = $facts['os']['family'] ? {
758-
'freebsd' => true,
758+
'FreeBSD' => true,
759759
default => false
760760
}
761761

@@ -837,7 +837,7 @@
837837
use_port_for_filenames => true,
838838
}
839839
$ssl_access_log_file = $facts['os']['family'] ? {
840-
'freebsd' => $access_log_file,
840+
'FreeBSD' => $access_log_file,
841841
default => "ssl_${access_log_file}",
842842
}
843843
::apache::vhost { 'default-ssl':

manifests/mod.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
# ordering, we ensure that our version of httpd.conf is reverted after
9595
# the module gets installed.
9696
$package_before = $facts['os']['family'] ? {
97-
'freebsd' => [
97+
'FreeBSD' => [
9898
File[$_loadfile_name],
9999
File["${apache::conf_dir}/${apache::params::conf_file}"]
100100
],

manifests/mod/cgid.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
# Debian specifies it's cgid sock path, but RedHat uses the default value
2020
# with no config file
2121
$cgisock_path = $facts['os']['family'] ? {
22-
'debian' => "\${APACHE_RUN_DIR}/cgisock",
23-
'freebsd' => 'cgisock',
22+
'Debian' => "\${APACHE_RUN_DIR}/cgisock",
23+
'FreeBSD' => 'cgisock',
2424
default => undef,
2525
}
2626

manifests/mod/dav_fs.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
class apache::mod::dav_fs {
77
include apache
88
$dav_lock = $facts['os']['family'] ? {
9-
'debian' => "\${APACHE_LOCK_DIR}/DAVLock",
10-
'freebsd' => '/usr/local/var/DavLock',
9+
'Debian' => "\${APACHE_LOCK_DIR}/DAVLock",
10+
'FreeBSD' => '/usr/local/var/DavLock',
1111
default => '/var/lib/dav/lockdb',
1212
}
1313

manifests/mod/disk_cache.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
$_cache_root = $cache_root
3232
} else {
3333
$_cache_root = $facts['os']['family'] ? {
34-
'debian' => '/var/cache/apache2/mod_cache_disk',
35-
'redhat' => '/var/cache/httpd/proxy',
36-
'freebsd' => '/var/cache/mod_cache_disk',
34+
'Debian' => '/var/cache/apache2/mod_cache_disk',
35+
'RedHat' => '/var/cache/httpd/proxy',
36+
'FreeBSD' => '/var/cache/mod_cache_disk',
3737
}
3838
}
3939

manifests/mod/event.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@
8484
}
8585

8686
case $facts['os']['family'] {
87-
'redhat', 'debian', 'freebsd' : {
87+
'RedHat', 'Debian', 'FreeBSD' : {
8888
apache::mpm { 'event':
8989
}
9090
}
91-
'gentoo': {
91+
'Gentoo': {
9292
::portage::makeconf { 'apache2_mpms':
9393
content => 'event',
9494
}

manifests/mod/itk.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,18 @@
7979
}
8080

8181
case $facts['os']['family'] {
82-
'redhat': {
82+
'RedHat': {
8383
package { 'httpd-itk':
8484
ensure => present,
8585
}
8686
::apache::mpm { 'itk':
8787
}
8888
}
89-
'debian', 'freebsd': {
89+
'Debian', 'FreeBSD': {
9090
apache::mpm { 'itk':
9191
}
9292
}
93-
'gentoo': {
93+
'Gentoo': {
9494
::portage::makeconf { 'apache2_mpms':
9595
content => 'itk',
9696
}

manifests/mod/peruser.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
) {
3434
include apache
3535
case $facts['os']['family'] {
36-
'freebsd' : {
36+
'FreeBSD' : {
3737
fail("Unsupported osfamily ${$facts['os']['family']}")
3838
}
3939
default: {
40-
if $facts['os']['family'] == 'gentoo' {
40+
if $facts['os']['family'] == 'Gentoo' {
4141
::portage::makeconf { 'apache2_mpms':
4242
content => 'peruser',
4343
}

0 commit comments

Comments
 (0)