From e9ca2e5594e6737ab3e682328f2cfa5584c86e35 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 3 Feb 2020 21:15:27 +0300 Subject: [PATCH] Feat(logcheck): Send email to root via `/etc/aliases` --- playbooks/roles/logcheck/tasks/main.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/playbooks/roles/logcheck/tasks/main.yml b/playbooks/roles/logcheck/tasks/main.yml index db94486..5a5e240 100644 --- a/playbooks/roles/logcheck/tasks/main.yml +++ b/playbooks/roles/logcheck/tasks/main.yml @@ -29,17 +29,8 @@ - name: Configure logcheck - send email to root become: true lineinfile: - path: /etc/logcheck/logcheck.conf - regexp: '^SENDMAILTO="root"$' - line: 'SENDMAILTO="root"' - insertafter: '^SENDMAILTO="logcheck"$' - -- name: Configure logcheck - do not send email to logcheck - become: true - lineinfile: - path: /etc/logcheck/logcheck.conf - regexp: '^SENDMAILTO="logcheck"$' - state: absent + path: /etc/aliases + line: 'logcheck: root' - name: Update logcheck ignore files become: true -- 2.39.2