Replace `SENDMAILTO="logcheck"` with `SENDMAILTO="root"`.
line: "INTRO=0"
insertafter: "^#INTRO=1$"
+- name: Configure logcheck - send 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
+
- name: Update logcheck ignore patterns
become: true
copy: