18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'manifests/mod/rpaf.pp', line 18
class apache::mod::rpaf (
Variant[Boolean, String] $sethostname = true,
Array[Stdlib::IP::Address] $proxy_ips = ['127.0.0.1'],
String $header = 'X-Forwarded-For',
String $template = 'apache/mod/rpaf.conf.epp'
) {
include apache
::apache::mod { 'rpaf': }
# Template uses:
# - $sethostname
# - $proxy_ips
# - $header
$parameters = {
'sethostname' => $sethostname,
'proxy_ips' => $proxy_ips,
'header' => $header,
}
file { 'rpaf.conf':
ensure => file,
path => "${apache::mod_dir}/rpaf.conf",
mode => $apache::file_mode,
content => epp($template, $parameters),
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}
|