paulbsd-salt/states/nftables/templates/blacklist.nft.j2

8 lines
257 B
Django/Jinja

## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{% set blackips = salt["bl.get_ips"]() -%}
{%- if blackips|length > 0 -%}
define blacklist = { {{ blackips|join(", ") }} }
{%- else -%}
define blacklist = { 127.255.255.255 }
{%- endif -%}