blob: 73e925181cdb012a028008e3a97b5bc2423bfddd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
---
- name: Install our nftables service
copy:
dest: '/etc/systemd/system/nftables.service'
src: nftables/nftables.service
owner: root
group: root
mode: 0644
- name: Install nftables package
dnf:
name: nftables
state: present
tags:
- packages
- name: Symlink to /etc/nftables.conf
file:
path: '/etc/sysconfig/nftables.conf'
src: '../nftables.conf'
state: link
force: yes
notify:
- reload nftables
- name: Configure nftables
copy:
dest: '/etc/nftables.conf'
src: nftables/nftables.conf
owner: root
group: root
mode: 0644
notify:
- reload nftables
- name: Enable nftables service
systemd:
name: nftables.service
enabled: yes
masked: no
state: started
when: not chroot
- name: '- when in chroot'
command: systemctl enable nftables.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/nftables.service'
when: chroot
# vim: set ts=2 sw=2 et:
|