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() %}
client {{ name }} {
{% if client.addr | ansible.utils.ipv6 %}
ipaddrv6 = {{ client.addr | ansible.utils.ipv6("address") }}
{% if client.addr | ansible.utils.ipv4 %}
ipv4addr = {{ client.addr | ansible.utils.ipv4("network") }}
{% else %}
ipaddr = {{ client.addr | ansible.utils.ipv4("address") }}
ipv6addr = {{ client.addr | ansible.utils.ipaddr("network") }}
{% endif %}
netmask = {{ client.addr | ansible.utils.ipaddr("prefix") }}
proto = *