From: Oleg Broytman Date: Mon, 3 Feb 2020 18:15:27 +0000 (+0300) Subject: Feat(logcheck): Send email to root via `/etc/aliases` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e9ca2e5594e6737ab3e682328f2cfa5584c86e35;p=ansible.git Feat(logcheck): Send email to root via `/etc/aliases` --- 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