From 3c71f5def32738637df5609d7ec73c49600dcd8f Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 2 Jan 2022 18:13:44 +0100 Subject: [PATCH] updated nftables state --- states/nftables/blacklist.nft.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/states/nftables/blacklist.nft.j2 b/states/nftables/blacklist.nft.j2 index deed150..71bc240 100644 --- a/states/nftables/blacklist.nft.j2 +++ b/states/nftables/blacklist.nft.j2 @@ -1,8 +1,8 @@ ## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} -{% set blackips = salt["bl.get_ips"]() %} +{% set blackips = salt["bl.get_ips"]() -%} -{% if blackips|length > 0 %} +{%- if blackips|length > 0 -%} define blacklist = { {{ blackips|join(", ") }} } -{% else %} +{%- else -%} define blacklist = { 127.255.255.255 } -{% endif %} \ No newline at end of file +{%- endif -%} \ No newline at end of file