Add nft_custom_includes option for optional includes in the main filter table.
This commit is contained in:
parent
e9a83261fa
commit
3be5c95180
|
@ -102,6 +102,11 @@ nft_global_host_rules: {}
|
||||||
# Custom content (tables, include,…) to add in Nftables configuration.
|
# Custom content (tables, include,…) to add in Nftables configuration.
|
||||||
nft__custom_content: ''
|
nft__custom_content: ''
|
||||||
# ]]]
|
# ]]]
|
||||||
|
# .. envvar:: nft_custom_includes [[[
|
||||||
|
#
|
||||||
|
# Custom includes to add into the main Nftables filter configuration.
|
||||||
|
nft_custom_includes: ''
|
||||||
|
# ]]]
|
||||||
# .. envvar:: nft_conf_dir_path [[[
|
# .. envvar:: nft_conf_dir_path [[[
|
||||||
#
|
#
|
||||||
# Path to the sub directory for Nftables configuration files.
|
# Path to the sub directory for Nftables configuration files.
|
||||||
|
|
|
@ -29,6 +29,15 @@ table inet filter {
|
||||||
include "{{ nft_set_conf_path }}"
|
include "{{ nft_set_conf_path }}"
|
||||||
include "{{ nft_input_conf_path }}"
|
include "{{ nft_input_conf_path }}"
|
||||||
include "{{ nft_output_conf_path }}"
|
include "{{ nft_output_conf_path }}"
|
||||||
|
{% if nft_custom_includes | default() %}
|
||||||
|
{% if nft_custom_includes is string %}
|
||||||
|
include "{{ nft_custom_includes }}"
|
||||||
|
{% elif nft_custom_includes is iterable and (nft_custom_includes is not string and nft_custom_includes is not mapping) %}
|
||||||
|
{% for include in nft_custom_includes %}
|
||||||
|
include "{{ include }}"
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if nft__nat_table_manage %}
|
{% if nft__nat_table_manage %}
|
||||||
|
|
Loading…
Reference in New Issue