New ansible support (again)

This commit is contained in:
Miha Frangež 2026-02-23 16:54:47 +01:00 committed by jetomit
parent 3ff4ed5a77
commit 518c3bc7b8
12 changed files with 33 additions and 33 deletions

View file

@ -16,10 +16,10 @@ iface {{ iface.name }}
ip6-forward off
{% for ip in iface.ip_addresses %}
address {{ ip.address }}
{% set subnet = ip.address | ipaddr('subnet') %}
{% set subnet = ip.address | ansible.utils.ipaddr('subnet') %}
{% set prefix = prefixes | selectattr('prefix', '==', subnet) | first %}
{% if prefix.custom_fields.gateway %}
gateway {{ prefix.custom_fields.gateway.address | ipaddr('address') }}
gateway {{ prefix.custom_fields.gateway.address | ansible.utils.ipaddr('address') }}
{% endif %}
{% endfor %}