diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-05-01 20:08:28 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-05-01 20:08:28 +0200 |
commit | 9eab0cdd0bbea0f899af5a7d68cc63523a12a703 (patch) | |
tree | af51142e3b4fac35482674111a3adf62010dfd4b /data/templates/firewall/nftables-defines.j2 | |
parent | 59290c857237912dc5cc67733622e2604f1ff30a (diff) | |
download | vyos-1x-9eab0cdd0bbea0f899af5a7d68cc63523a12a703.tar.gz vyos-1x-9eab0cdd0bbea0f899af5a7d68cc63523a12a703.zip |
firewall: T4353: fix Jinja2 linting errors
Diffstat (limited to 'data/templates/firewall/nftables-defines.j2')
-rw-r--r-- | data/templates/firewall/nftables-defines.j2 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/data/templates/firewall/nftables-defines.j2 b/data/templates/firewall/nftables-defines.j2 new file mode 100644 index 000000000..4fa92f2e3 --- /dev/null +++ b/data/templates/firewall/nftables-defines.j2 @@ -0,0 +1,32 @@ +{% if group is vyos_defined %} +{% if group.address_group is vyos_defined %} +{% for group_name, group_conf in group.address_group.items() %} +define A_{{ group_name }} = { {{ group_conf.address | join(",") }} } +{% endfor %} +{% endif %} +{% if group.ipv6_address_group is vyos_defined %} +{% for group_name, group_conf in group.ipv6_address_group.items() %} +define A6_{{ group_name }} = { {{ group_conf.address | join(",") }} } +{% endfor %} +{% endif %} +{% if group.mac_group is vyos_defined %} +{% for group_name, group_conf in group.mac_group.items() %} +define M_{{ group_name }} = { {{ group_conf.mac_address | join(",") }} } +{% endfor %} +{% endif %} +{% if group.network_group is vyos_defined %} +{% for group_name, group_conf in group.network_group.items() %} +define N_{{ group_name }} = { {{ group_conf.network | join(",") }} } +{% endfor %} +{% endif %} +{% if group.ipv6_network_group is vyos_defined %} +{% for group_name, group_conf in group.ipv6_network_group.items() %} +define N6_{{ group_name }} = { {{ group_conf.network | join(",") }} } +{% endfor %} +{% endif %} +{% if group.port_group is vyos_defined %} +{% for group_name, group_conf in group.port_group.items() %} +define P_{{ group_name }} = { {{ group_conf.port | join(",") }} } +{% endfor %} +{% endif %} +{% endif %}
\ No newline at end of file |