]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/logcheck/tasks/main.yml
Feat(logcheck): Improve task titles
[ansible.git] / playbooks / roles / logcheck / tasks / main.yml
index 22a5e782e8b1161dd652198dea55b02755865cfb..db94486a3da2762faa2c3700735606c4daab11c0 100644 (file)
     line: "INTRO=0"
     insertafter: "^#INTRO=1$"
 
-- name: Update logcheck ignore patterns
+- 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
+
+- name: Update logcheck ignore files
   become: true
   copy:
     src: ignore.d/