Skip to content

Commit 56c9e1e

Browse files
committed
Stricter data type on apache::vhost::access_logs
This always required an array of hashes and closer matches the actual behavior. It also fixes the check on the template use by checking the correct variable. bb96180 broke this. Fixes: bb96180
1 parent 7b22dae commit 56c9e1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

manifests/vhost.pp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,7 @@
18001800
Variant[Boolean,String] $access_log_syslog = false,
18011801
Variant[Boolean,String] $access_log_format = false,
18021802
Variant[Boolean,String] $access_log_env_var = false,
1803-
Optional[Array] $access_logs = undef,
1803+
Optional[Array[Hash]] $access_logs = undef,
18041804
Boolean $use_servername_for_filenames = false,
18051805
Boolean $use_port_for_filenames = false,
18061806
Optional[Variant[Array[Hash],Hash,String]] $aliases = undef,
@@ -2134,6 +2134,8 @@
21342134
}]
21352135
} elsif $access_logs {
21362136
$_access_logs = $access_logs
2137+
} else {
2138+
$_access_logs = []
21372139
}
21382140

21392141
if $error_log_file {
@@ -2459,13 +2461,12 @@
24592461
}
24602462

24612463
# Template uses:
2462-
# - $access_log
2464+
# - $_access_logs
24632465
# - $_access_log_env_var
24642466
# - $access_log_destination
24652467
# - $_access_log_format
24662468
# - $_access_log_env_var
2467-
# - $access_logs
2468-
if $access_log or $access_logs {
2469+
if !empty($_access_logs) {
24692470
concat::fragment { "${name}-access_log":
24702471
target => "${priority_real}${filename}.conf",
24712472
order => 100,

0 commit comments

Comments
 (0)