diff options
| author | Antoine Ouvrard <antoine.ouvrard@zextras.fr> | 2023-03-09 16:44:05 +0100 |
|---|---|---|
| committer | Antoine Ouvrard <antoine.ouvrard@zextras.fr> | 2023-03-09 16:44:05 +0100 |
| commit | 38129c2455892386eb8c9171c90154192d5480ac (patch) | |
| tree | fe0a52f9a2763b7248460cc42601dc6923b8184a /ansible_tools/roles/set-fail2ban/tasks/main.yml | |
ajoute les archives
Diffstat (limited to 'ansible_tools/roles/set-fail2ban/tasks/main.yml')
| -rw-r--r-- | ansible_tools/roles/set-fail2ban/tasks/main.yml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ansible_tools/roles/set-fail2ban/tasks/main.yml b/ansible_tools/roles/set-fail2ban/tasks/main.yml new file mode 100644 index 0000000..778a8b0 --- /dev/null +++ b/ansible_tools/roles/set-fail2ban/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: Installing Fail2ban + ansible.builtin.apt: + update_cache: yes + name: fail2ban + +- name: Copy {{ item.src }} config + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: root + group: root + mode: 0644 + backup: yes + loop: + - { src: 'jail.conf.ubuntu.j2', dest: '/etc/fail2ban/jail.conf' } + - { src: 'zimbra.conf.ubuntu.j2', dest: '/etc/fail2ban/filter.d/zimbra.conf' } + - { src: 'zimbra-postfix.conf.ubuntu.j2', dest: '/etc/fail2ban/filter.d/zimbra-postfix.conf' } + - { src: 'sendmail.conf.ubuntu.j2', dest: '/etc/fail2ban/action.d/sendmail.conf' } + - { src: 'sendmail-common.conf.ubuntu.j2', dest: '/etc/fail2ban/action.d/sendmail-common.conf' } + #notify: Reload fail2ban |
