2016-03-10 16:53:35 +01:00
|
|
|
---
|
|
|
|
- name: Install a script that removes the old transaction logs
|
|
|
|
template: src=ldap_logs_cleaner.sh.j2 dest=/usr/local/bin/ldap_logs_cleaner owner=root group=root mode=0500
|
|
|
|
tags: [ 'ldap_server', 'ldap', 'ldap_conf', 'ldap_db_cleaner' ]
|
|
|
|
|
|
|
|
- name: Install a cron job to run the ldap cleaner daily
|
|
|
|
cron: name="LDAP transaction logs cleaner" hour="0" job="/usr/local/bin/ldap_logs_cleaner"
|
|
|
|
when: openldap_cleaner_cron_job
|
|
|
|
tags: [ 'ldap_server', 'ldap', 'ldap_conf', 'ldap_db_cleaner' ]
|
|
|
|
|
2018-05-08 20:38:34 +02:00
|
|
|
- name: Remove the cron job that runs the ldap cleaner when it is not needed. When DB_LOG_AUTOREMOVE is set, for instance
|
2016-03-10 16:53:35 +01:00
|
|
|
cron: name="LDAP transaction logs cleaner" state=absent
|
|
|
|
when: not openldap_cleaner_cron_job
|
|
|
|
tags: [ 'ldap_server', 'ldap', 'ldap_conf', 'ldap_db_cleaner' ]
|