diff --git a/roles/ldap_server/files/slapd_logrotate b/roles/ldap_server/files/slapd_logrotate new file mode 100644 index 0000000000000000000000000000000000000000..5584beda458f0f2a84b7391454c75e4664744312 --- /dev/null +++ b/roles/ldap_server/files/slapd_logrotate @@ -0,0 +1,13 @@ +/var/log/slapd.log +{ + rotate 4 + weekly + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + invoke-rc.d rsyslog rotate > /dev/null + endscript +} diff --git a/roles/ldap_server/tasks/main.yml b/roles/ldap_server/tasks/main.yml index 110306a9a37502fce2ee3dd8b979d3c8b9c608b1..61bb7e8e2aa6b0f4af7429e56345d1abeffa0eec 100644 --- a/roles/ldap_server/tasks/main.yml +++ b/roles/ldap_server/tasks/main.yml @@ -17,6 +17,9 @@ notify: - Restart rsyslog +- name: Deploy configuration file for log rotation of slapd logs + copy: src=slapd_logrotate dest=/etc/logrotate.d/slapd owner=root group=root mode=0644 + - name: Install Python LDAP bindings apt: name=python-ldap state=installed