|
1 class apache::mod::negotiation ( |
|
2 $force_language_priority = 'Prefer Fallback', |
|
3 $language_priority = [ 'en', 'ca', 'cs', 'da', 'de', 'el', 'eo', 'es', 'et', |
|
4 'fr', 'he', 'hr', 'it', 'ja', 'ko', 'ltz', 'nl', 'nn', |
|
5 'no', 'pl', 'pt', 'pt-BR', 'ru', 'sv', 'zh-CN', |
|
6 'zh-TW' ], |
|
7 ) { |
|
8 if !is_array($force_language_priority) and !is_string($force_language_priority) { |
|
9 fail('force_languague_priority must be a string or array of strings') |
|
10 } |
|
11 if !is_array($language_priority) and !is_string($language_priority) { |
|
12 fail('force_languague_priority must be a string or array of strings') |
|
13 } |
|
14 |
|
15 ::apache::mod { 'negotiation': } |
|
16 # Template uses no variables |
|
17 file { 'negotiation.conf': |
|
18 ensure => file, |
|
19 path => "${::apache::mod_dir}/negotiation.conf", |
|
20 content => template('apache/mod/negotiation.conf.erb'), |
|
21 require => Exec["mkdir ${::apache::mod_dir}"], |
|
22 before => File[$::apache::mod_dir], |
|
23 notify => Class['apache::service'], |
|
24 } |
|
25 } |