fuel-library/deployment/puppet/rsyslog/manifests/config.pp
Bogdan Dobrelya 00668c65bc Exclude rsyslog::install (avoid dependency loops for custom runstages)
Assumes rsyslog packages installed at BM or included in distro

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
2013-07-12 19:44:31 +03:00

42 lines
1.0 KiB
Puppet

class rsyslog::config {
# assumes rsyslog packages installed at BM or included in distro
File {
owner => root,
group => $rsyslog::params::run_group,
mode => 0640,
# To avoid dependency loops for custom runstages
#require => Class["rsyslog::install"],
notify => Class["rsyslog::service"],
}
file { $rsyslog::params::rsyslog_conf:
ensure => file,
content => template("${module_name}/rsyslog.conf.erb"),
}
file { '/var/lib/rsyslog' :
ensure => directory,
path => $::rsyslog::params::rsyslog_queues_dir,
}
case $osfamily {
'Debian': {
file { $rsyslog::params::rsyslog_default:
ensure => file,
source => "puppet:///modules/rsyslog/rsyslog_default",
}
}
'RedHat': {
file { "/etc/sysconfig/rsyslog":
content => template("rsyslog/rsyslog.erb"),
}
}
default: {
fail("Unsupported osfamily: ${osfamily} for os ${operatingsystem}")
}
}
file { $rsyslog::params::spool_dir:
ensure => directory,
}
}