nftables: Initial version of role
This commit is contained in:
parent
400d3272ae
commit
6ca1808bb5
4 changed files with 91 additions and 0 deletions
25
roles/nftables/tasks/main.yml
Normal file
25
roles/nftables/tasks/main.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
- name: remove firewalld
|
||||
ansible.builtin.package:
|
||||
name: firewalld
|
||||
state: removed
|
||||
|
||||
- name: install packages
|
||||
ansible.builtin.package:
|
||||
name: nftables
|
||||
state: installed
|
||||
|
||||
- name: create config
|
||||
ansible.builtin.template:
|
||||
src: nftables.conf.j2
|
||||
dest: /etc/sysconfig/nftables.conf
|
||||
mode: 0600
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: reload nftables
|
||||
|
||||
- name: enable service
|
||||
ansible.builtin.service:
|
||||
name: nftables
|
||||
state: started
|
||||
enabled: true
|
Loading…
Add table
Add a link
Reference in a new issue