2015-08-23 11:06:25 +02:00
|
|
|
---
|
|
|
|
- name: Install firewalld and deps
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution_version is version_compare('15.04', '>=')
|
2017-12-29 19:11:55 +01:00
|
|
|
apt: pkg={{ item }} state=present
|
2018-04-02 14:52:51 +02:00
|
|
|
loop:
|
2015-08-23 11:06:25 +02:00
|
|
|
- firewalld
|
|
|
|
- tidy
|
2018-04-25 17:58:31 +02:00
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
- firewall
|
2015-08-23 11:06:25 +02:00
|
|
|
|
|
|
|
- name: Copy firewalld public zone file
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution_version is version_compare('15.04', '>=')
|
2015-08-23 11:06:25 +02:00
|
|
|
template: src=public.xml.j2 dest=/etc/firewalld/zones/public.xml owner=root mode=0600
|
2018-04-25 17:58:31 +02:00
|
|
|
tags: firewall
|
2015-08-23 11:06:25 +02:00
|
|
|
|
|
|
|
- name: Format public.xml firewalld zone file
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution_version is version_compare('15.04', '>=')
|
2017-11-04 23:49:03 +01:00
|
|
|
command: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
|
2015-08-23 11:06:25 +02:00
|
|
|
notify:
|
2017-11-02 17:58:15 +01:00
|
|
|
- reload firewalld
|
2018-04-25 17:58:31 +02:00
|
|
|
tags: firewall
|
2018-04-25 17:55:22 +02:00
|
|
|
|
|
|
|
# vim: set sw=2 ts=2:
|