network/roles/firewall/templates/interfaces.j2

11 lines
277 B
Django/Jinja

{% set addrs = interfaces | selectattr('name', '==', 'lo') | map(attribute='ip_addresses') | first -%}
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
address {{ wg_ip }}
{% for address in addrs %}
address {{ address.address }}
{% endfor %}