initial commit
This commit is contained in:
commit
88b851cfff
4 changed files with 109 additions and 0 deletions
31
tasks/main.yml
Normal file
31
tasks/main.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
- name: remove legacy firewalls
|
||||
apt:
|
||||
pkg:
|
||||
- ferm
|
||||
- iptables
|
||||
purge: True
|
||||
state: absent
|
||||
|
||||
- name: ensure nft is installed
|
||||
package:
|
||||
name: nftables
|
||||
notify:
|
||||
- reload nftables
|
||||
|
||||
- name: setup firewall directories
|
||||
file:
|
||||
path: /etc/nftables.d
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
state: directory
|
||||
|
||||
- name: update firewall rules
|
||||
template:
|
||||
src: nftables.conf.j2
|
||||
dest: /etc/nftables.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
notify:
|
||||
- reload nftables
|
||||
Loading…
Add table
Add a link
Reference in a new issue