Skip to content

Commit c0c0d55

Browse files
committed
Add logrotate configuraton for stepup-authentication.log
1 parent 7a96377 commit c0c0d55

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

roles/rsyslog/tasks/process_auth_logs.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
with_items: "{{ rsyslog_environments }}"
5050
when: item.db_loglogins_name is defined
5151

52-
- name: Put log_logins logrotate scripts
52+
- name: Put log_logins logrotate scripts for ebauth
5353
ansible.builtin.template:
5454
src: logrotate_ebauth.j2
5555
dest: /etc/logrotate.d/logrotate_ebauth_{{ item.name }}
@@ -59,6 +59,16 @@
5959
with_items: "{{ rsyslog_environments }}"
6060
when: item.db_loglogins_name is defined
6161

62+
- name: Put log_logins logrotate scripts for stepup
63+
template:
64+
src: logrotate_stepup_authentication.j2
65+
dest: /etc/logrotate.d/logrotate_stepup_authentication_{{ item.name }}
66+
mode: 0644
67+
owner: root
68+
group: root
69+
with_items: "{{ rsyslog_environments }}"
70+
when: item.db_loglogins_name is defined
71+
6272
- name: Create logdirectory for log_logins cleanup script
6373
ansible.builtin.file:
6474
path: "{{ rsyslog_dir }}/apps/{{ item.name }}/loglogins_cleanup/"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{ rsyslog_dir }}/log_logins/{{ item.name }}/stepup-authentication.log
2+
{
3+
missingok
4+
daily
5+
rotate 180
6+
sharedscripts
7+
dateext
8+
dateyesterday
9+
compress
10+
delaycompress
11+
create 0640 root {{ rsyslog_read_group }}
12+
postrotate
13+
# TODO: Write logs to MySQL for further processing (e.g. for deprovisioning)
14+
# E.g.: /usr/local/sbin/parse_stepup_authentication_to_mysql_{{ item.name }}.py > /dev/null
15+
systemctl kill -s HUP rsyslog.service
16+
endscript
17+
}

0 commit comments

Comments
 (0)