2020-11-10 21:17:11 +01:00
|
|
|
#jinja2: lstrip_blocks: "True", trim_blocks: "True"
|
2017-08-08 14:32:59 +02:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
{% set setmerged = nft_set_default.copy() %}
|
2018-08-06 15:09:20 +02:00
|
|
|
{% set _ = setmerged.update(nft_set) %}
|
2017-08-08 14:32:59 +02:00
|
|
|
{% set _ = setmerged.update(nft_set_group) %}
|
2020-12-30 17:12:50 +01:00
|
|
|
{% if nft_merged_groups and hostvars[inventory_hostname]['nft_combined_rules'].nft_set_group is defined %}
|
2020-11-10 21:17:11 +01:00
|
|
|
{% set _ = setmerged.update(hostvars[inventory_hostname]['nft_combined_rules'].nft_set_group) %}
|
|
|
|
{% endif %}
|
2017-08-08 14:32:59 +02:00
|
|
|
{% set _ = setmerged.update(nft_set_host) %}
|
|
|
|
|
|
|
|
{% for set, rules in setmerged|dictsort %}
|
2020-11-10 21:17:11 +01:00
|
|
|
{% if rules %}
|
2017-08-08 14:32:59 +02:00
|
|
|
set {{ set }} {
|
2020-11-10 21:17:11 +01:00
|
|
|
{% for rule in rules %}
|
2017-08-08 14:32:59 +02:00
|
|
|
{{ rule }}
|
2020-11-10 21:17:11 +01:00
|
|
|
{% endfor %}
|
2017-08-08 14:32:59 +02:00
|
|
|
}
|
2020-11-10 21:17:11 +01:00
|
|
|
{% endif %}
|
2017-08-08 14:32:59 +02:00
|
|
|
|
|
|
|
{% endfor %}
|