Update for CentOS 8

This commit is contained in:
Adrien Reslinger 2020-04-15 22:46:47 +02:00
parent 71f6942e4b
commit a015b6817f
3 changed files with 11 additions and 2 deletions

View file

@ -1,6 +1,6 @@
--- ---
- name: Include vars for {{ ansible_os_family }} - name: Include vars for {{ ansible_os_family }}
include_vars: "{{ ansible_os_family }}.yml" include_vars: "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
- name: Install packages for fail2ban - name: Install packages for fail2ban
package: name="{{ fail2ban_packages }}" state=latest update_cache=yes package: name="{{ fail2ban_packages }}" state=latest update_cache=yes
@ -9,7 +9,7 @@
stat: path=/etc/fail2ban/paths-overrides.local stat: path=/etc/fail2ban/paths-overrides.local
register: pathsoverrides register: pathsoverrides
- name: Touch the standard log file - name: Touch the standard local file
file: path=/etc/fail2ban/paths-overrides.local state=touch owner=root group=root mode=0640 file: path=/etc/fail2ban/paths-overrides.local state=touch owner=root group=root mode=0640
when: when:
- not pathsoverrides.stat.exists - not pathsoverrides.stat.exists

9
vars/RedHat_8.yml Normal file
View file

@ -0,0 +1,9 @@
---
fail2ban_packages:
- fail2ban
- fail2ban-firewalld
- fail2ban-mail
- fail2ban-systemd
# - fail2ban-sendmail
# - fail2ban-server