]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/logcheck/tasks/main.yml
Feat(logcheck): Send email to root via `/etc/aliases`
[ansible.git] / playbooks / roles / logcheck / tasks / main.yml
index a303e5a406ea4f4618fdc9d1e3bd7f236aee90b0..5a5e2405c1df7ba4640a692cfe1f9ac334d84f9a 100644 (file)
@@ -1,4 +1,4 @@
-- name: Install logcheck
+- name: Install logcheck (Debian)
   become: true
   apt:
     autoclean: yes
@@ -10,7 +10,7 @@
     update_cache: yes
   when: ansible_facts.os_family == 'Debian'
 
-- name: Install logcheck
+- name: Install logcheck (RedHat)
   become: true
   dnf:
     name: logcheck
@@ -18,7 +18,7 @@
     update_cache: yes
   when: ansible_facts.os_family == 'RedHat'
 
-- name: Configure logcheck
+- name: Configure logcheck - intro
   become: true
   lineinfile:
     path: /etc/logcheck/logcheck.conf
     line: "INTRO=0"
     insertafter: "^#INTRO=1$"
 
-- name: Update logcheck ignore patterns
+- name: Configure logcheck - send email to root
+  become: true
+  lineinfile:
+    path: /etc/aliases
+    line: 'logcheck: root'
+
+- name: Update logcheck ignore files
   become: true
   copy:
     src: ignore.d/