14
15
16
17
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/journal_upload.pp', line 14
class systemd::journal_upload (
Optional[String[1]] $package_name = undef,
Enum['running','stopped'] $service_ensure = 'running',
Boolean $service_enable = true,
) {
assert_private()
if $package_name {
stdlib::ensure_packages($package_name)
}
service { 'systemd-journal-upload':
ensure => $service_ensure,
enable => $service_enable,
}
$systemd::journal_upload_settings.each |$option, $value| {
ini_setting { "journal-upload_${option}":
path => '/etc/systemd/journal-upload.conf',
section => 'Upload',
setting => $option,
notify => Service['systemd-journal-upload'],
}
if $value =~ Systemd::JournaldSettings::Ensure {
Ini_setting["journal-upload_${option}"] {
* => $value,
}
} else {
Ini_setting["journal-upload_${option}"] {
value => $value,
}
}
}
}
|