Skip to content
Snippets Groups Projects
Commit 04e7eb51 authored by Trung Nguyen's avatar Trung Nguyen
Browse files

Merge branch 'fail2ban' into 'master'

Adding fail2ban role

See merge request hpc-team/ansible_cluster_in_a_box!257
parents 0e740e0d 386f926f
No related branches found
No related tags found
1 merge request!257Adding fail2ban role
---
- 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