Created
March 5, 2010 14:11
-
-
Save masterzen/322744 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syslog | |
class syslog { | |
file { | |
"/etc/cron.daily/sysklogd": | |
ensure => absent; | |
} | |
file { | |
"/etc/syslog.conf": | |
owner => root, group => adm, mode => 0640, | |
ensure => file; | |
} | |
file { | |
"/etc/logrotate.d/syslog": | |
owner => root, group => root, mode => 0644, | |
} | |
file { | |
"/etc/default/syslogd": | |
owner => root, group => root, mode => 0644, | |
} | |
} | |
class syslog::logger inherits syslog { | |
service { | |
"sysklogd": | |
hasrestart => true, ensure => running, pattern => "syslogd"; | |
} | |
File["/etc/syslog.conf"] { notify => Service["sysklogd"] } | |
File["/etc/default/syslogd"] { notify => Service["sysklogd"] } | |
} | |
class syslog::loghost inherits syslog::logger { | |
File["/etc/logrotate.d/syslog"] { source => "puppet:///syslog/logrotate.loghost" } | |
File["/etc/syslog.conf"] { content => template("syslog/syslog.conf.loghost") } | |
File["/etc/default/syslogd"] { source => "puppet:///syslog/syslogd.default.loghgost" } | |
} | |
class syslog::client inherits syslog::logger { | |
File["/etc/logrotate.d/syslog"] { source => "puppet:///syslog/logrotate.client" } | |
File["/etc/syslog.conf"] { content => template("syslog/syslog.conf.client") } | |
} | |
class rsyslog::client inherits syslog { | |
package { "rsyslog": ensure => installed; } | |
service{ "rsyslog": | |
ensure => running, hasrestart => true, pattern => "rsyslogd" | |
} | |
File["/etc/syslog.conf"] { path => "/etc/rsyslog.conf", content => template("syslog/rsyslog.conf.client"), notify => Service['rsyslog'] } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment