1 - name: Install logcheck (Debian)
11 when: ansible_facts.os_family == 'Debian'
13 - name: Install logcheck (RedHat)
19 when: ansible_facts.os_family == 'RedHat'
21 - name: Configure logcheck - intro
24 path: /etc/logcheck/logcheck.conf
27 insertafter: "^#INTRO=1$"
29 - name: Configure logcheck - send email to root
32 path: /etc/logcheck/logcheck.conf
33 regexp: '^SENDMAILTO="root"$'
34 line: 'SENDMAILTO="root"'
35 insertafter: '^SENDMAILTO="logcheck"$'
37 - name: Configure logcheck - do not send email to logcheck
40 path: /etc/logcheck/logcheck.conf
41 regexp: '^SENDMAILTO="logcheck"$'
44 - name: Update logcheck ignore files
48 dest: "/etc/logcheck/ignore.d.{{ item }}"
51 directory_mode: '0750'
53 loop: ['server', 'workstation']