summaryrefslogtreecommitdiff
path: root/manifests/config.pp
blob: 886321de3716b0b8a246429ae259bd14cd91f94c (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
49
# == Class: rsyslog::config
#
# Full description of class role here.
#
# === Parameters
#
# === Variables
#
# === Examples
#
#  class { 'rsyslog::config': }
#
class rsyslog::config inherits rsyslog::params {
  file { $rsyslog::params::rsyslog_d:
    ensure  => directory,
    owner   => 'root',
    group   => $rsyslog::params::run_group,
    purge   => $rsyslog::params::purge_rsyslog_d,
    recurse => true,
    force   => true,
    require => Class['rsyslog::install'],
  }

  file { $rsyslog::params::rsyslog_conf:
    ensure  => file,
    owner   => 'root',
    group   => $rsyslog::params::run_group,
    content => template("${module_name}/rsyslog.conf.erb"),
    require => Class['rsyslog::install'],
    notify  => Class['rsyslog::service'],
  }

  file { $rsyslog::params::rsyslog_default:
    ensure  => file,
    owner   => 'root',
    group   => $rsyslog::params::run_group,
    source  => 'puppet:///modules/rsyslog/rsyslog_default',
    require => Class['rsyslog::install'],
    notify  => Class['rsyslog::service'],
  }

  file { $rsyslog::params::spool_dir:
    ensure  => directory,
    owner   => 'root',
    group   => $rsyslog::params::run_group,
    require => Class['rsyslog::install'],
    notify  => Class['rsyslog::service'],
  }
}