X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Froles%2Flogcheck%2Ftasks%2Fmain.yml;h=83980f962ea2b55e4781e92a1a7234f6dae6c7c6;hb=4d9d923c5b88425f016906404f5e415ff19c0537;hp=db94486a3da2762faa2c3700735606c4daab11c0;hpb=7a7816e08468f05474b5cd246a945d82e15fbbfd;p=ansible.git diff --git a/playbooks/roles/logcheck/tasks/main.yml b/playbooks/roles/logcheck/tasks/main.yml index db94486..83980f9 100644 --- a/playbooks/roles/logcheck/tasks/main.yml +++ b/playbooks/roles/logcheck/tasks/main.yml @@ -5,7 +5,7 @@ autoremove: yes cache_valid_time: 3600 install_recommends: no - name: logcheck + name: ['logcheck', 'logcheck-database'] state: latest update_cache: yes when: ansible_facts.os_family == 'Debian' @@ -29,17 +29,8 @@ - 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 + path: /etc/aliases + line: 'logcheck: root' - name: Update logcheck ignore files become: true