Ansible/node-configuration/tasks/ssh.yml

22 lines
441 B
YAML
Raw Permalink Normal View History

2022-05-25 23:24:56 +00:00
---
2022-06-11 00:32:23 +00:00
- name: Ensures fail2ban dir exists
file:
path: /etc/fail2ban
state: directory
2022-05-25 23:24:56 +00:00
- name: Configure fail2ban
copy:
src: ../templates/fail2ban.conf
dest: /etc/fail2ban/fail2ban.conf
backup: yes
2022-06-11 00:32:23 +00:00
- name: Update package cache (apt/Debian)
ansible.builtin.apt:
update_cache: yes
when: ansible_distribution == "Debian"
2022-06-11 00:32:23 +00:00
- name: Install fail2ban
ansible.builtin.package:
name: fail2ban
state: present