This repository has been archived by the owner on Feb 9, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 31ab1c3
Showing
7 changed files
with
779 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syslog puppet module | ||
#################### | ||
|
||
This module configures syslog-ng both as a client or as a server. | ||
|
||
# Syslog client | ||
include syslog | ||
|
||
# Syslog server | ||
include syslog::server |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class syslog { | ||
package {"syslog-ng": | ||
ensure => installed, | ||
} | ||
|
||
service {"syslog-ng": | ||
ensure => running, | ||
subscribe => File["/etc/syslog-ng/syslog-ng.conf"], | ||
require => Package["syslog-ng"], | ||
} | ||
|
||
file {"/etc/syslog-ng/syslog-ng.conf": | ||
ensure => present, | ||
content => template("syslog/syslog-ng.client.conf.erb"), | ||
require => Package["syslog-ng"], | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class syslog::server inherits syslog { | ||
package {"logrotate": | ||
ensure => installed, | ||
} | ||
|
||
File["/etc/syslog-ng/syslog-ng.conf"] { | ||
ensure => present, | ||
content => template("syslog/syslog-ng.server.conf.erb"), | ||
} | ||
|
||
# Log repository | ||
file {"/srv/syslog": | ||
ensure => directory, | ||
} | ||
|
||
file {"/srv/syslog/logs": | ||
ensure => directory, | ||
require => File["/srv/syslog"], | ||
} | ||
|
||
# Log rotation | ||
file {"/etc/logrotate.d/logserver": | ||
ensure => present, | ||
content => template("syslog/logserver.logrotate.erb"), | ||
require => Package["logrotate"], | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
import "classes/*.pp" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/srv/syslog/logs/*/*.log { | ||
weekly | ||
rotate 52 | ||
compress | ||
missingok | ||
} |
Oops, something went wrong.