Refs #8025 Rol debian-base. fail2ban task - ensure /var/log/auth exists before restarting Fail2ban for systemd exit code 0

This commit is contained in:
Xavi Lleó 2024-10-14 13:53:36 +02:00
parent 49c42b4127
commit 684a298e03
3 changed files with 10 additions and 3 deletions

View File

@ -6,7 +6,7 @@
systemd: systemd:
name: ssh name: ssh
state: restarted state: restarted
- name: restart-fail2ban - name: restart fail2ban
systemd: systemd:
name: fail2ban name: fail2ban
state: restarted state: restarted

View File

@ -9,4 +9,11 @@
owner: root owner: root
group: root group: root
mode: u=rw,g=r,o=r mode: u=rw,g=r,o=r
notify: restart-fail2ban notify: restart fail2ban
- name: Ensure file for auth sshd custom log exists
file:
path: /var/log/auth.log
state: touch
owner: root
group: adm
mode: u=rw,g=r,o=