diff options
author | Micah Anderson <micah@leap.se> | 2015-01-13 10:23:48 -0500 |
---|---|---|
committer | Micah Anderson <micah@leap.se> | 2015-01-13 17:51:06 -0500 |
commit | 663fe4574674bdeaf2e8c749e7e46d3fe1e6c2e4 (patch) | |
tree | a9c91df2c9034d21fb0655853fad0e9f9d4d98d3 /puppet | |
parent | b503fc864c8152f4e76d284a6ef89eddec59028b (diff) |
Configure rsyslog to put leap-mx logs into /var/log/leap/mx.log,
and setup logrotation (#6637)
Change-Id: I873517b2d99f5b55289728969b49d5405da7d4c6
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/modules/leap_mx/manifests/init.pp | 3 | ||||
-rw-r--r-- | puppet/modules/leap_mx/manifests/syslog.pp | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp index c90fc231..c2cc96c6 100644 --- a/puppet/modules/leap_mx/manifests/init.pp +++ b/puppet/modules/leap_mx/manifests/init.pp @@ -9,7 +9,8 @@ class leap_mx { include soledad::common include site_apt::preferences::twisted - + include leap_mx::syslog + # # USER AND GROUP # diff --git a/puppet/modules/leap_mx/manifests/syslog.pp b/puppet/modules/leap_mx/manifests/syslog.pp new file mode 100644 index 00000000..0247a392 --- /dev/null +++ b/puppet/modules/leap_mx/manifests/syslog.pp @@ -0,0 +1,17 @@ +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' ] + } + +} |