diff options
author | elijah <elijah@riseup.net> | 2015-04-17 10:24:37 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-04-17 10:24:37 -0700 |
commit | f3aa928a91e0172a7a3c940940ab864194cb85a7 (patch) | |
tree | 433c2784c878301dcc36478e32496b9140d4a407 /puppet/modules/leap_mx/manifests | |
parent | 8bd7eca1913a8ca23e8b2c92b83aeac5a665131b (diff) | |
parent | 64cc83793aa35b84b60dd40305c7edf8369a187b (diff) |
Merge branch 'bugfix/logs' into develop
Diffstat (limited to 'puppet/modules/leap_mx/manifests')
-rw-r--r-- | puppet/modules/leap_mx/manifests/init.pp | 23 | ||||
-rw-r--r-- | puppet/modules/leap_mx/manifests/syslog.pp | 17 |
2 files changed, 22 insertions, 18 deletions
diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp index 78065f56..6bcdd19a 100644 --- a/puppet/modules/leap_mx/manifests/init.pp +++ b/puppet/modules/leap_mx/manifests/init.pp @@ -11,7 +11,6 @@ class leap_mx { include soledad::common include site_apt::preferences::twisted - include leap_mx::syslog # # USER AND GROUP @@ -42,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 # @@ -68,4 +75,18 @@ class leap_mx { hasrestart => true, require => [ Package['leap-mx'] ]; } + + augeas { + "logrotate_mx": + context => "/files/etc/logrotate.d/leap-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' + ] + } } 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' ] - } - -} |