freeradius: fix clients.conf (ipv4addr + ipv6addr)

This commit is contained in:
jeltz 2022-08-31 04:47:23 +02:00
parent 3d6e0f21b6
commit 8937e4f8e8
Signed by: jeltz
GPG key ID: 800882B66C0C3326

View file

@ -2,10 +2,10 @@
{% for name, client in radiusd__clients.items() %} {% for name, client in radiusd__clients.items() %}
client {{ name }} { client {{ name }} {
{% if client.addr | ansible.utils.ipv6 %} {% if client.addr | ansible.utils.ipv4 %}
ipaddrv6 = {{ client.addr | ansible.utils.ipv6("address") }} ipv4addr = {{ client.addr | ansible.utils.ipv4("network") }}
{% else %} {% else %}
ipaddr = {{ client.addr | ansible.utils.ipv4("address") }} ipv6addr = {{ client.addr | ansible.utils.ipaddr("network") }}
{% endif %} {% endif %}
netmask = {{ client.addr | ansible.utils.ipaddr("prefix") }} netmask = {{ client.addr | ansible.utils.ipaddr("prefix") }}
proto = * proto = *