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

8 lines
247 B
Django/Jinja

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