make auditlog working

This commit is contained in:
2025-05-13 22:25:24 +02:00
parent 4b0312e471
commit f6b509505e
3 changed files with 28 additions and 0 deletions

View File

@@ -219,6 +219,20 @@
when: ldap_entries is defined
ignore_errors: true
- name: touch /var/log/ldapaudit.log
ansible.builtin.file:
path: /var/log/ldapaudit.log
owner: "{{ ldap_user }}"
group: "{{ ldap_user }}"
state: touch
tags: auditlog
- name: rotate /var/log/ldapaudit.log
tags: auditlog
ansible.builtin.template:
src: logrotate_auditlog
dest: /etc/logrotate.d/
- name: setup backup
ansible.builtin.import_tasks: backup.yml
tags: backup_ldap

View File

@@ -0,0 +1,7 @@
/var/log/ldapaudit.log {
daily
create 640 {{ ldap_user }} {{ ldap_user }}
rotate 30
missingok
notifempty
}

View File

@@ -0,0 +1,7 @@
/var/log/ldapaudit.log {
daily
create 640 {{ ldap_user }} {{ ldap_user }}
rotate 30
missingok
notifempty
}