Add firewall rules

This commit is contained in:
nemunaire 2023-03-16 02:58:20 +01:00
commit c1e32bd6b1
3 changed files with 96 additions and 1 deletions

View file

@ -90,6 +90,13 @@
loop:
- token-validator
- name: Setup firewall
template:
src: nftables.rules.j2
dest: "/var/lib/lxc/{{ ctr_name }}/rootfs/etc/nftables.nft"
tags:
- firewall
- name: Setup runlevels
file:
path: "/var/lib/lxc/{{ ctr_name }}/rootfs/etc/runlevels/{{ item.runlevel }}/{{ item.filename }}"
@ -100,6 +107,7 @@
- { filename: "token-validator", runlevel: "default" }
- { filename: "checker", runlevel: "default" }
- { filename: "clean-wg", runlevel: "default" }
- { filename: "nftables", runlevel: "boot" }
# Does not work
- name: Setup maatma container

View file

@ -14,7 +14,8 @@
group: srs-deploy
state: directory
# 3. Install others scripts
# 3. Install firewall
# 4. Install others scripts
- name: configure wg-adlin
copy:
src: "/etc/wireguard/wg-adlin.conf"