Update playbook to fix idempotence
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user