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