36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'manifests/mod/cache_disk.pp', line 36
class apache::mod::cache_disk (
Optional[Stdlib::Absolutepath] $cache_root = undef,
Array[String] $cache_enable = [],
Optional[Integer] $cache_dir_length = undef,
Optional[Integer] $cache_dir_levels = undef,
Optional[Integer] $cache_max_filesize = undef,
Optional[String] $cache_ignore_headers = undef,
Optional[String] $configuration_file_name = undef,
) {
include apache
if $cache_ignore_headers {
deprecation(
'apache::mod::cache_disk',
'The parameter cache_ignore_headers is deprecated. Please use apache::mod::cache::cache_ignore_headers instead.'
)
}
$_cache_root = $cache_root ? {
undef => $facts['os']['family'] ? {
'debian' => '/var/cache/apache2/mod_cache_disk',
'redhat' => '/var/cache/httpd/proxy',
'freebsd' => '/var/cache/mod_cache_disk',
},
default => $cache_root,
}
$_configuration_file_name = pick($configuration_file_name, 'cache_disk.conf')
$_class_name = 'apache::mod::cache_disk'
apache::mod { 'cache_disk': }
Class['apache::mod::cache'] -> Class[$_class_name]
file { $_configuration_file_name:
ensure => file,
path => "${apache::mod_dir}/${_configuration_file_name}",
mode => $apache::file_mode,
content => epp('apache/mod/cache_disk.conf.epp', {
cache_root => $_cache_root,
cache_enable => $cache_enable,
cache_dir_length => $cache_dir_length,
cache_dir_levels => $cache_dir_levels,
cache_max_filesize => $cache_max_filesize,
cache_ignore_headers => $cache_ignore_headers,
}),
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}
|