From a362c89a44aeffa4e99b84e27b4374107ade006b Mon Sep 17 00:00:00 2001 From: eliot Date: Mon, 18 Aug 2025 17:13:01 +0200 Subject: [PATCH] Update playbook to fix idempotence --- ssh_config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ssh_config.yml b/ssh_config.yml index 646d66d..4ee0fd6 100644 --- a/ssh_config.yml +++ b/ssh_config.yml @@ -59,6 +59,17 @@ state: present 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 ansible.builtin.copy: dest: /etc/fail2ban/jail.local