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
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
|
# File 'modules/mtail/manifests/init.pp', line 20
class mtail (
Array[Stdlib::Unixpath] $logs = ['/var/log/syslog'],
Stdlib::Port $port = 3903,
Wmflib::Ensure $service_ensure = 'present',
String $group = 'root',
Boolean $from_component = false,
String $additional_args = ''
) {
# On bullseye or newer versions simply use the default mtail package
# since they include the patches we need.
if debian::codename::ge('bullseye') {
ensure_packages('mtail')
} else {
if ( $from_component ) {
apt::package_from_component { 'mtail':
component => 'component/mtail'
}
} else {
apt::pin { 'mtail':
pin => 'version 3.0.0~rc35-3+wmf3',
package => 'mtail',
priority => 1001,
before => Package['mtail'],
}
package { 'mtail':
ensure => '3.0.0~rc35-3+wmf3',
}
}
}
file { '/etc/default/mtail':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
content => debian::codename::ge('bookworm') ? {
true => template('mtail/default-bookworm.erb'),
false => template('mtail/default.erb'),
},
notify => Service['mtail'],
}
systemd::service { 'mtail':
ensure => $service_ensure,
content => debian::codename::ge('bookworm') ? {
true => init_template('mtail', 'systemd_override_bookworm'),
false => init_template('mtail', 'systemd_override'),
},
override => true,
restart => true,
}
}
|