summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/manifests/rsyslog.pp
diff options
context:
space:
mode:
Diffstat (limited to 'sitemodules/profiles/manifests/rsyslog.pp')
-rw-r--r--sitemodules/profiles/manifests/rsyslog.pp48
1 files changed, 48 insertions, 0 deletions
diff --git a/sitemodules/profiles/manifests/rsyslog.pp b/sitemodules/profiles/manifests/rsyslog.pp
new file mode 100644
index 0000000..3a92d9d
--- /dev/null
+++ b/sitemodules/profiles/manifests/rsyslog.pp
@@ -0,0 +1,48 @@
+# Class: profiles::rsyslog.pp
+# =========================
+#
+# This class installs and configures rsyslog
+#
+# Parameters
+# ----------
+#
+# @param enable_klog whether to enable kernel logging
+#
+# Examples
+# --------
+#
+# @example
+# class roles::myhost {
+# include profiles::rsyslog
+# }
+#
+# Authors
+# -------
+#
+# Jan Dittberner <jandd@cacert.org>
+#
+# Copyright
+# ---------
+#
+# Copyright 2017 Jan Dittberner
+class profiles::rsyslog (
+ Boolean $enable_klog = false,
+) {
+ package { 'rsyslog':
+ ensure => present,
+ } ->
+ file { '/etc/rsyslog.conf':
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ content => epp(
+ 'profiles/rsyslog/rsyslog.conf.epp',
+ {'enable_klog' => $enable_klog}
+ ),
+ } ->
+ service { 'rsyslog':
+ ensure => running,
+ enable => true,
+ }
+}