summaryrefslogtreecommitdiff
path: root/manifests/server.pp
blob: f5d7e88ea1fa4068be91c8b2c7df0e8dc96d5025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class rsyslog::server (
  $enable_tcp                = true,
  $enable_udp                = true,
  $server_dir                = '/srv/log/',
  $custom_config             = undef,
  $high_precision_timestamps = false
) inherits rsyslog {

    file { $rsyslog::params::server_conf:
        ensure  => present,
        owner   => root,
        group   => $rsyslog::params::run_group,
        content => $custom_config ? {
            ''      => template("${module_name}/server.conf.erb"),
            default => template($custom_config),
        },
        require => Class['rsyslog::config'],
        notify  => Class['rsyslog::service'],
    }
}