23 lines
519 B
YAML
23 lines
519 B
YAML
|
- name:
|
||
|
become: true
|
||
|
block:
|
||
|
- name: Install package nftables
|
||
|
apt:
|
||
|
name: nftables
|
||
|
|
||
|
- name: Template nftables.conf to /etc/nftables.conf
|
||
|
template:
|
||
|
src: nftables.conf
|
||
|
dest: /etc/nftables.conf
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: '755'
|
||
|
register: nftables_template_conf_result
|
||
|
|
||
|
- name: Restart nftables service
|
||
|
service:
|
||
|
name: nftables
|
||
|
state: restarted
|
||
|
enabled: true
|
||
|
when: nftables_template_conf_result['changed']
|