Skip to content

Commit 6a37b36

Browse files
committed
Only warn about servername logging if relevant
The warning about $use_servername_for_filenames is long and may not affect users. If they use a normal $name, there would effectively be no difference. This compares $name to $normalized_servername. The warning is only relevant Only if they differ. Technically there could be a space in $servername (since there is no data type to enforce validation) but Apache wouldn't accept that anyway. It also fixes two typos in the warnings.
1 parent 958023b commit 6a37b36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

manifests/vhost.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,15 +2111,15 @@
21112111
false => $name,
21122112
}
21132113

2114-
if ! $use_servername_for_filenames {
2114+
if ! $use_servername_for_filenames and $name != $normalized_servername {
21152115
$use_servername_for_filenames_warn_msg = '
21162116
It is possible for the $name parameter to be defined with spaces in it. Although supported on POSIX systems, this
21172117
can lead to cumbersome file names. The $servername attribute has stricter conditions from Apache (i.e. no spaces)
21182118
When $use_servername_for_filenames = true, the $servername parameter, sanitized, is used to construct log and config
21192119
file names.
21202120
21212121
From version v7.0.0 of the puppetlabs-apache module, this parameter will default to true. From version v8.0.0 of the
2122-
module, the $use_servername_for_filenames will be removed and log/config file names will be dervied from the
2122+
module, the $use_servername_for_filenames will be removed and log/config file names will be derived from the
21232123
sanitized $servername parameter when not explicitly defined.'
21242124
warning($use_servername_for_filenames_warn_msg)
21252125
} elsif ! $use_port_for_filenames {
@@ -2130,7 +2130,7 @@
21302130
config file names.
21312131
21322132
From version v7.0.0 of the puppetlabs-apache module, this parameter will default to true. From version v8.0.0 of the
2133-
module, the $use_port_for_filenames will be removed and log/config file names will be dervied from the
2133+
module, the $use_port_for_filenames will be removed and log/config file names will be derived from the
21342134
sanitized $servername parameter when not explicitly defined.'
21352135
warning($use_port_for_filenames_warn_msg)
21362136
}

0 commit comments

Comments
 (0)