]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/logcheck/tasks/main.yml
Feat(logcheck): Send email to root via `/etc/aliases`
[ansible.git] / playbooks / roles / logcheck / tasks / main.yml
index f6a5f2c6b3197acc0c0275c06faf72e0888cb041..5a5e2405c1df7ba4640a692cfe1f9ac334d84f9a 100644 (file)
     line: "INTRO=0"
     insertafter: "^#INTRO=1$"
 
-- name: Configure logcheck - send to root
+- 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 - not send 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 patterns
+- name: Update logcheck ignore files
   become: true
   copy:
     src: ignore.d/