Skip to content
Snippets Groups Projects
Commit 5a36aae4 authored by Gin Tan (Monash University)'s avatar Gin Tan (Monash University)
Browse files

Adding fail2ban role

Former-commit-id: 386f926f
parent 89470770
No related branches found
No related tags found
No related merge requests found
---
- name: restart fail2ban
service: name=fail2ban state=restarted
---
- name: Install fail2ban on Red Hat system
yum:
name:
- fail2ban-server
- fail2ban-systemd
- fail2ban-sendmail
state: present
become: true
become_user: root
when: ansible_os_family == "RedHat"
- name: Copy jail.conf.j2 to /etc/fail2ban/jail.conf
template:
src: jail.conf.j2
dest: /etc/fail2ban/jail.conf
mode: 0644
owner: root
group: root
become: true
become_user: root
notify:
- restart fail2ban
- name: Enable fail2ban service
systemd:
name: fail2ban
enabled: yes
state: started
become: true
become_user: root
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment