Puppet Class: rsyslog

Defined in:
modules/rsyslog/manifests/init.pp

Overview

Class: rsyslog

rsyslogd is a full-featured kernel logging daemon. It is the default syslogd implementation on Debian systems.



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
# File 'modules/rsyslog/manifests/init.pp', line 6

class rsyslog {
    package { 'rsyslog':
        ensure => present,
    }

    file { '/etc/rsyslog.d':
        ensure  => directory,
        source  => 'puppet:///modules/rsyslog/rsyslog.d-empty',
        owner   => 'root',
        group   => 'root',
        mode    => '0755',
        recurse => true,
        purge   => true,
        force   => true,
        ignore  => '50-default.conf',
        require => Package['rsyslog'],
        notify  => Service['rsyslog'],
    }

    service { 'rsyslog':
        ensure  => running,
        require => Package['rsyslog'],
    }

    if os_version('debian >= stretch') {
        base::service_auto_restart { 'rsyslog': }
    }
}