X-Git-Url: https://git.phdru.name/?p=ansible.git;a=blobdiff_plain;f=playbooks%2Froles%2Flogcheck%2Ftasks%2Fmain.yml;h=f6a5f2c6b3197acc0c0275c06faf72e0888cb041;hp=22a5e782e8b1161dd652198dea55b02755865cfb;hb=f070a0281012512248a14faec5e679eab1b5cc1d;hpb=188faa6976df1b5ba9147282952250968180fd94 diff --git a/playbooks/roles/logcheck/tasks/main.yml b/playbooks/roles/logcheck/tasks/main.yml index 22a5e78..f6a5f2c 100644 --- a/playbooks/roles/logcheck/tasks/main.yml +++ b/playbooks/roles/logcheck/tasks/main.yml @@ -26,6 +26,21 @@ 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: