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

8 lines
249 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 %}