1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
class rsyslog {
package { 'rsyslog':
ensure => present,
}
exec { 'restart-rsyslog':
command => '/usr/sbin/service rsyslog restart',
user => root,
refreshonly => true,
}
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741496
file { '/etc/systemd/system/syslog.service':
force => true,
ensure => '/lib/systemd/system/rsyslog.service',
owner => 'root',
group => 'root',
require => Package['rsyslog'],
notify => Exec['restart-rsyslog'],
}
service { 'rsyslog' :
ensure => running,
enable => true,
require => File['/etc/systemd/system/syslog.service'],
}
file { '/etc/rsyslog.d/00-anon.conf':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/rsyslog/anon.conf',
require => Package['rsyslog'],
notify => Service['rsyslog'],
}
}
|