From 7becb5c762df5089bb0c4ff5a7f2fb026379fcb3 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 1 Jul 2014 23:56:18 +0200 Subject: Tel logcheck which logs to monitor. --- roles/common/tasks/logging.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'roles/common/tasks') diff --git a/roles/common/tasks/logging.yml b/roles/common/tasks/logging.yml index 9430d0b..62727c9 100644 --- a/roles/common/tasks/logging.yml +++ b/roles/common/tasks/logging.yml @@ -37,7 +37,7 @@ - meta: flush_handlers -- name: Configure logcheck +- name: Configure logcheck (1) copy: src=etc/logcheck/{{ item }} dest=/etc/logcheck/{{ item }} owner=root group=logcheck @@ -53,6 +53,20 @@ tags: - logcheck +- name: Configure logcheck (2) + lineinfile: dest=/etc/logcheck/logcheck.logfiles + line={{ item }} + state=present + create=yes + owner=root group=logcheck + mode=0640 + with_items: + - /var/log/syslog + - /var/log/auth.log + - /var/log/mail.log + tags: + - logcheck + - name: Minimal logging policy (1) lineinfile: dest=/etc/logrotate.d/rsyslog regexp="^/var/log/mail\\.(log|info|sasl)$" -- cgit v1.2.3