Alan Orth
7551b803f6
There is a bug in iptables 1.8.2 in Debian 10 "Buster" that causes firewalld to fail when restoring rules. The bug has been fixed in iptables 1.8.3, which is currently in buster-backports. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914694
27 lines
877 B
YAML
27 lines
877 B
YAML
---
|
|
|
|
- block:
|
|
- name: Install iptables 1.8.3 on Debian Buster
|
|
when: ansible_distribution_major_version is version_compare('10', '==')
|
|
apt: pkg=iptables state=present default_release=buster-backports
|
|
|
|
- name: Install firewalld and deps
|
|
when: ansible_distribution_major_version is version_compare('8', '>=')
|
|
apt: pkg={{ item }} state=present
|
|
loop:
|
|
- firewalld
|
|
- tidy
|
|
|
|
- name: Copy firewalld public zone file
|
|
when: ansible_distribution_major_version is version_compare('8', '>=')
|
|
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', '>=')
|
|
command: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
|
|
notify:
|
|
- reload firewalld
|
|
tags: firewall
|
|
|
|
# vim: set sw=2 ts=2:
|