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