2014-08-16 23:35:57 +02:00
|
|
|
---
|
2015-06-07 11:42:03 +02:00
|
|
|
- name: Install firewalld and deps
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution_major_version is version_compare('8', '>=')
|
2017-12-29 19:11:55 +01:00
|
|
|
apt: pkg={{ item }} state=present
|
2015-06-07 11:42:03 +02:00
|
|
|
with_items:
|
|
|
|
- firewalld
|
|
|
|
- tidy
|
2016-08-14 15:33:48 +02:00
|
|
|
tags: packages
|
2015-06-07 11:42:03 +02:00
|
|
|
|
|
|
|
- name: Copy firewalld public zone file
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution_major_version is version_compare('8', '>=')
|
2015-06-07 11:42:03 +02:00
|
|
|
template: src=public.xml.j2 dest=/etc/firewalld/zones/public.xml owner=root mode=0600
|
|
|
|
|
|
|
|
- name: Format public.xml firewalld zone file
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution_major_version is version_compare('8', '>=')
|
2017-11-04 23:49:03 +01:00
|
|
|
command: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
|
2015-06-07 11:42:03 +02:00
|
|
|
notify:
|
2017-11-02 17:58:15 +01:00
|
|
|
- reload firewalld
|