From bb07407485ed1626221a1190cc2fb2789f95ed22 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 15 Apr 2015 16:12:11 -0700 Subject: clean up logging mess: add 'logfile' define, mv openvpn and stunnel logs to their own files, fix mx logwatch path. --- puppet/modules/leap_mx/manifests/init.pp | 3 ++- puppet/modules/leap_mx/manifests/syslog.pp | 17 ----------------- 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 puppet/modules/leap_mx/manifests/syslog.pp (limited to 'puppet/modules/leap_mx/manifests') diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp index 78065f56..a0590ee1 100644 --- a/puppet/modules/leap_mx/manifests/init.pp +++ b/puppet/modules/leap_mx/manifests/init.pp @@ -11,7 +11,8 @@ class leap_mx { include soledad::common include site_apt::preferences::twisted - include leap_mx::syslog + + leap::logfile { 'mx': process => 'leap-mx'} # # USER AND GROUP diff --git a/puppet/modules/leap_mx/manifests/syslog.pp b/puppet/modules/leap_mx/manifests/syslog.pp deleted file mode 100644 index 0247a392..00000000 --- a/puppet/modules/leap_mx/manifests/syslog.pp +++ /dev/null @@ -1,17 +0,0 @@ -class leap_mx::syslog { - - rsyslog::snippet { '99-leap-mx': - content => 'if $programname startswith \'leap-mx\' then /var/log/leap/mx.log -&~' - } - - augeas { - 'logrotate_leap-mx': - context => '/files/etc/logrotate.d/leap-mx/rule', - changes => [ 'set file /var/log/leap/mx*.log', 'set rotate 7', - 'set schedule daily', 'set compress compress', - 'set missingok missingok', 'set ifempty notifempty', - 'set copytruncate copytruncate' ] - } - -} -- cgit v1.2.3 From c7e12fd3cfe482e22e337eaea80ca7994dea7524 Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 16 Apr 2015 20:57:11 -0700 Subject: stunnel shouldn't use syslog, and leap_mx can't. --- puppet/modules/leap_mx/manifests/init.pp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'puppet/modules/leap_mx/manifests') diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp index a0590ee1..0d15d053 100644 --- a/puppet/modules/leap_mx/manifests/init.pp +++ b/puppet/modules/leap_mx/manifests/init.pp @@ -12,8 +12,6 @@ class leap_mx { include soledad::common include site_apt::preferences::twisted - leap::logfile { 'mx': process => 'leap-mx'} - # # USER AND GROUP # @@ -43,6 +41,14 @@ class leap_mx { notify => Service['leap-mx']; } + file { '/etc/default/leap_mx': + content => 'LOGFILE=/var/log/leap/mx.log', + owner => 'root', + group => 'root', + mode => '0644', + notify => Service['leap-mx']; + } + # # LEAP-MX CODE AND DEPENDENCIES # @@ -69,4 +75,18 @@ class leap_mx { hasrestart => true, require => [ Package['leap-mx'] ]; } + + augeas { + "logrotate_mx": + context => "/files/etc/logrotate.d/mx/rule", + changes => [ + "set file /var/log/leap/mx.log", + 'set rotate 5', + 'set schedule daily', + 'set compress compress', + 'set missingok missingok', + 'set ifempty notifempty', + 'set copytruncate copytruncate' + ] + } } -- cgit v1.2.3 From 64cc83793aa35b84b60dd40305c7edf8369a187b Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 17 Apr 2015 10:19:37 -0700 Subject: rename leap-mx logrotate file; minor style change. --- puppet/modules/leap_mx/manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puppet/modules/leap_mx/manifests') diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp index 0d15d053..6bcdd19a 100644 --- a/puppet/modules/leap_mx/manifests/init.pp +++ b/puppet/modules/leap_mx/manifests/init.pp @@ -78,7 +78,7 @@ class leap_mx { augeas { "logrotate_mx": - context => "/files/etc/logrotate.d/mx/rule", + context => "/files/etc/logrotate.d/leap-mx/rule", changes => [ "set file /var/log/leap/mx.log", 'set rotate 5', -- cgit v1.2.3