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

20 lines
726 B
Plaintext
Raw Normal View History

#jinja2: lstrip_blocks: "True", trim_blocks: "True"
2017-08-08 12:11:58 +02:00
# {{ ansible_managed }}
{% set definemerged = nft_define_default.copy() %}
{% set _ = definemerged.update(nft_define) %}
2017-08-08 12:11:58 +02:00
{% set _ = definemerged.update(nft_define_group) %}
{% if merged_groups and hostvars[inventory_hostname]['nft_combined_rules'].nft_define_group is defined%}
{% set _ = definemerged.update(hostvars[inventory_hostname]['nft_combined_rules'].nft_define_group) %}
{% endif %}
2017-08-08 12:11:58 +02:00
{% set _ = definemerged.update(nft_define_host) %}
{% for definition in definemerged.values() %}
{% if definition.desc is defined %}
2017-08-08 12:11:58 +02:00
# {{ definition.desc }}
{% else %}
2017-08-08 12:11:58 +02:00
# {{ definition.name }}
{% endif %}
2017-08-08 12:11:58 +02:00
define {{ definition.name }} = {{ definition.value }}
{% endfor %}