|
1778 | 1778 | Boolean $use_servername_for_filenames = false,
|
1779 | 1779 | Boolean $use_port_for_filenames = false,
|
1780 | 1780 | Array[Hash[String[1], String[1]]] $aliases = [],
|
1781 |
| - Optional[Array[Hash]] $directories = undef, |
| 1781 | + Array[Hash] $directories = [], |
1782 | 1782 | Boolean $error_log = true,
|
1783 | 1783 | Optional[String] $error_log_file = undef,
|
1784 | 1784 | Optional[String] $error_log_pipe = undef,
|
|
2152 | 2152 | }
|
2153 | 2153 |
|
2154 | 2154 | ## Create a default directory list if none defined
|
2155 |
| - if $directories { |
| 2155 | + if !empty($directories) { |
2156 | 2156 | $_directories = $directories
|
2157 | 2157 | } elsif $docroot {
|
2158 | 2158 | $_directories = [
|
|
2166 | 2166 | },
|
2167 | 2167 | ]
|
2168 | 2168 | } else {
|
2169 |
| - $_directories = undef |
| 2169 | + $_directories = [] |
2170 | 2170 | }
|
2171 | 2171 |
|
2172 | 2172 | ## Create a global LocationMatch if locations aren't defined
|
|
2309 | 2309 | }
|
2310 | 2310 | }
|
2311 | 2311 |
|
2312 |
| - if $_directories and ! empty($_directories) and $ensure == 'present' { |
| 2312 | + if $ensure == 'present' { |
2313 | 2313 | $_directories.each |Hash $directory| {
|
2314 | 2314 | if 'auth_basic_authoritative' in $directory or 'auth_basic_fake' in $directory or 'auth_basic_provider' in $directory {
|
2315 | 2315 | include apache::mod::auth_basic
|
|
2364 | 2364 | # - $docroot
|
2365 | 2365 | # - $shibboleth_enabled
|
2366 | 2366 | # - $cas_enabled
|
2367 |
| - concat::fragment { "${name}-directories": |
2368 |
| - target => "${priority_real}${filename}.conf", |
2369 |
| - order => 60, |
2370 |
| - content => template('apache/vhost/_directories.erb'), |
| 2367 | + unless empty($_directories) { |
| 2368 | + concat::fragment { "${name}-directories": |
| 2369 | + target => "${priority_real}${filename}.conf", |
| 2370 | + order => 60, |
| 2371 | + content => template('apache/vhost/_directories.erb'), |
| 2372 | + } |
2371 | 2373 | }
|
2372 | 2374 | }
|
2373 | 2375 |
|
|
0 commit comments