roles/common: Bump version checks to Debian 9
This commit is contained in:
parent
0605f70f2e
commit
9db104efa6
@ -10,7 +10,7 @@
|
||||
- python3-systemd # for fail2ban systemd backend
|
||||
|
||||
- name: Install firewalld and deps
|
||||
when: ansible_distribution_major_version is version_compare('8', '>=')
|
||||
when: ansible_distribution_major_version is version_compare('9', '>=')
|
||||
apt: pkg={{ debian_firewall_packages }} state=present
|
||||
|
||||
- name: Use nftables backend in firewalld
|
||||
@ -35,17 +35,17 @@
|
||||
- restart firewalld
|
||||
|
||||
- name: Copy firewalld public zone file
|
||||
when: ansible_distribution_major_version is version_compare('8', '>=')
|
||||
when: ansible_distribution_major_version is version_compare('9', '>=')
|
||||
template: src=public.xml.j2 dest=/etc/firewalld/zones/public.xml owner=root mode=0600
|
||||
|
||||
- name: Format public.xml firewalld zone file
|
||||
when: ansible_distribution_major_version is version_compare('8', '>=')
|
||||
when: ansible_distribution_major_version is version_compare('9', '>=')
|
||||
command: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
|
||||
notify:
|
||||
- restart firewalld
|
||||
|
||||
- name: Copy ipsets of abusive IPs
|
||||
when: ansible_distribution_major_version is version_compare('8', '>=')
|
||||
when: ansible_distribution_major_version is version_compare('9', '>=')
|
||||
copy: src={{ item }} dest=/etc/firewalld/ipsets/{{ item }} owner=root group=root mode=0600
|
||||
loop:
|
||||
- abusers-ipv4.xml
|
||||
|
Loading…
Reference in New Issue
Block a user