Update playbook to fix idempotence

This commit is contained in:
eliot
2025-08-18 17:13:01 +02:00
parent efb386b61a
commit a362c89a44

View File

@@ -59,6 +59,17 @@
state: present state: present
update_cache: true update_cache: true
- name: Create log file
ansible.builtin.file:
path: /var/log/auth.log
state: touch
owner: root
group: root
mode: '0644'
modification_time: preserve
access_time: preserve
notify: restart fail2ban
- name: Configure Fail2Ban for SSH - name: Configure Fail2Ban for SSH
ansible.builtin.copy: ansible.builtin.copy:
dest: /etc/fail2ban/jail.local dest: /etc/fail2ban/jail.local