ansible.nftables/templates/etc/nftables.d/defines.nft.j2

16 lines
401 B
Django/Jinja

# {{ ansible_managed }}
{% set definemerged = nft_define_default.copy() %}
{% set _ = definemerged.update(nft_define_group) %}
{% set _ = definemerged.update(nft_define_host) %}
{% for definition in definemerged.values() %}
{% if definition.desc is defined %}
# {{ definition.desc }}
{% else %}
# {{ definition.name }}
{% endif %}
define {{ definition.name }} = {{ definition.value }}
{% endfor %}