diff --git a/files/rsyslog.conf b/files/rsyslog.conf new file mode 100644 index 0000000000000000000000000000000000000000..ee28bd21f0b15599eb6ad27b15b4fea1fd6dc0b1 --- /dev/null +++ b/files/rsyslog.conf @@ -0,0 +1,3 @@ +# NOTE: This file in managed by the timehost::remote_logging class. +# Only log to the main log server to reduce local media wear. +*.* @loghost.lysator.liu.se diff --git a/manifests/remote_logging.pp b/manifests/remote_logging.pp new file mode 100644 index 0000000000000000000000000000000000000000..3b13001d4959a1643bf579196d8edd939ad22195 --- /dev/null +++ b/manifests/remote_logging.pp @@ -0,0 +1,21 @@ +# Class for only logging to Lysator's log server. +# Used to reduce wear to local storage. +class timehost::remote_logging { + package { 'rsyslog': + ensure => present, + } + + file {'/etc/rsyslog.conf': + ensure => present, + source => 'puppet:///modules/timehost/rsyslog.conf', + owner => 'root', + group => 'root', + mode => '0644', + notify => Service['rsyslogd'], + } + + service { 'rsyslogd': + ensure => running, + enable => true, + } +}