r/samba-dc: Configure logrotate for KDC

The KDC service, as managed by Samba, continuously logs to two files
that need to be rotated.  The upstream configuration for logrotate only
manages one of these files, and does not correctly signal the service
after rotating, as it expects the service to be managed by systemd
instead of Samba.  As such, we need to adjust the configuration to
handle both files and send SIGHUP directly to the process.
collectd-buildroot
Dustin 2022-04-24 11:35:51 -05:00
parent d363026db2
commit 24228953b0
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,9 @@
/var/log/krb5kdc.log /var/log/samba/mit_kdc.log {
missingok
notifempty
monthly
rotate 2
postrotate
pkill -HUP krb5kdc || true
endscript
}

View File

@ -117,3 +117,11 @@
samba-tool domain exportkeytab /etc/krb5.keytab
--principal=host/{{ ansible_fqdn }}
creates=/etc/krb5.keytab
- name: ensure logroate is configured for samba kdc
copy:
src: krb5kdc.logrotate.conf
dest: /etc/logrotate.d/krb5kdc
mode: u=rw,go=r
tags:
- logrotate