make auditlog working
This commit is contained in:
@@ -219,6 +219,20 @@
|
|||||||
when: ldap_entries is defined
|
when: ldap_entries is defined
|
||||||
ignore_errors: true
|
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
|
- name: setup backup
|
||||||
ansible.builtin.import_tasks: backup.yml
|
ansible.builtin.import_tasks: backup.yml
|
||||||
tags: backup_ldap
|
tags: backup_ldap
|
||||||
|
|||||||
7
template logrotate_auditlog
Normal file
7
template logrotate_auditlog
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/var/log/ldapaudit.log {
|
||||||
|
daily
|
||||||
|
create 640 {{ ldap_user }} {{ ldap_user }}
|
||||||
|
rotate 30
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
||||||
7
templates/logrotate_auditlog
Normal file
7
templates/logrotate_auditlog
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/var/log/ldapaudit.log {
|
||||||
|
daily
|
||||||
|
create 640 {{ ldap_user }} {{ ldap_user }}
|
||||||
|
rotate 30
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user