nftables: Fix deprecation warnings
This commit is contained in:
parent
3a76cd0c87
commit
354b5b293c
1 changed files with 4 additions and 4 deletions
|
@ -11,10 +11,10 @@ table ip filter {
|
|||
{% for rule in firewall_in %}
|
||||
{% if rule.from is defined %}
|
||||
{% for from in rule.from %}
|
||||
{% if not from | ipv4 and not from | ipv6 %}
|
||||
{% if not from | ansible.utils.ipv4 and not from | ansible.utils.ipv6 %}
|
||||
{% set from = lookup('dig', from) %}
|
||||
{% endif %}
|
||||
{% if from | ipv4 %}
|
||||
{% if from | ansible.utils.ipv4 %}
|
||||
ip saddr {{ from }} {{ rule.proto }} dport {{ rule.port }} accept
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -38,10 +38,10 @@ table ip6 filter {
|
|||
{% for rule in firewall_in %}
|
||||
{% if rule.from is defined %}
|
||||
{% for from in rule.from %}
|
||||
{% if not from | ipv4 and not from | ipv6 %}
|
||||
{% if not from | ansible.utils.ipv4 and not from | ansible.utils.ipv6 %}
|
||||
{% set from = lookup('dig', from) %}
|
||||
{% endif %}
|
||||
{% if from | ipv6 %}
|
||||
{% if from | ansible.utils.ipv6 %}
|
||||
ip6 saddr {{ from }} {{ rule.proto }} dport {{ rule.port }} accept
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Reference in a new issue