Merge tmakinen/puppet

Conflicts:
	dovecot/manifests/init.pp
	libvirt/manifests/init.pp
	munin/manifests/init.pp
	puppet/manifests/init.pp
	tftp/manifests/init.pp
This commit is contained in:
Ossi Salmi 2012-11-16 19:40:31 +02:00
commit 98767cfb2a
45 changed files with 5517 additions and 156 deletions

View file

@ -212,8 +212,15 @@ class syslog::client::rsyslog {
# $syslog_datadir:
# Directory where to store logs. Defaults to /srv/log.
#
# $syslog_rotate:
# Array of log files to rotate. Defaults to 'all.log'.
#
class syslog::common::standalone inherits syslog::common {
if !$syslog_rotate {
$syslog_rotate = [ "all.log" ]
}
if $syslog_datadir {
file { $syslog_datadir:
ensure => directory,
@ -277,8 +284,9 @@ class syslog::common::standalone inherits syslog::common {
default => "root",
},
}
$syslog_rotate_files = inline_template('<%= syslog_rotate.join(" ") -%>')
cron { "logarchiver.sh":
command => "/usr/local/sbin/logarchiver.sh",
command => "/usr/local/sbin/logarchiver.sh ${syslog_rotate_files} >/dev/null",
user => "root",
hour => 0,
minute => 0,
@ -370,3 +378,31 @@ class syslog::server::rsyslog inherits syslog::client::rsyslog {
}
}
# Install syslog server with custom configuration.
#
class syslog::custom inherits syslog::common::standalone {
case $syslog_type {
"syslogd": { fail("Server for \$syslog_type '$syslog_type' not yet supported.") }
"rsyslog": { include syslog::custom::rsyslog }
default: { fail("Unknown \$syslog_type '$syslog_type'") }
}
}
# Install syslog server using rsyslog with custom configuration.
#
class syslog::custom::rsyslog inherits syslog::client::rsyslog {
File["/etc/rsyslog.conf"] {
content => undef,
source => [ "puppet:///files/syslog/rsyslog.conf.${homename}",
"puppet:///files/syslog/rsyslog.conf", ],
require => [ File["/srv/log"],
File["/var/log/all.log"], ],
}
}