summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/manifests/rsyslog.pp
blob: 3a92d9ddbf248eedfd095ea117455ed0203f5054 (plain)
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
38
39
40
41
42
43
44
45
46
47
48
# Class: profiles::rsyslog.pp
# =========================
#
# This class installs and configures rsyslog
#
# Parameters
# ----------
#
# @param enable_klog whether to enable kernel logging
#
# Examples
# --------
#
# @example
#   class roles::myhost {
#     include profiles::rsyslog
#   }
#
# Authors
# -------
#
# Jan Dittberner <jandd@cacert.org>
#
# Copyright
# ---------
#
# Copyright 2017 Jan Dittberner
class profiles::rsyslog (
  Boolean $enable_klog = false,
) {
  package { 'rsyslog':
    ensure => present,
  } ->
  file { '/etc/rsyslog.conf':
    ensure  => file,
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => epp(
      'profiles/rsyslog/rsyslog.conf.epp',
      {'enable_klog' => $enable_klog}
    ),
  } ->
  service { 'rsyslog':
    ensure => running,
    enable => true,
  }
}