From 7dcb7709dff6b11c9415498b2a8c2a1b3651edd1 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 16 Aug 2024 23:20:51 +0200 Subject: Better link naming. --- tnet/wg-links-link.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tnet/wg-links-link.yml') diff --git a/tnet/wg-links-link.yml b/tnet/wg-links-link.yml index 6f1bb87..632024e 100644 --- a/tnet/wg-links-link.yml +++ b/tnet/wg-links-link.yml @@ -7,6 +7,8 @@ - name: "Make netdev for {{ inventory_hostname }} -> {{ item.key }}" notify: systemctl restart systemd-networkd become: yes + vars: + if_name: tnet-{{ item.if_name|default(item.key) }} copy: dest: "/etc/systemd/network/50-tnet-{{ item.key }}.netdev" owner: systemd-network @@ -14,7 +16,7 @@ mode: 0640 content: | [NetDev] - Name=tnet-{{ item.key }} + Name={{ if_name }} Kind=wireguard Description=tnet link to {{ item.key }} -- cgit v1.2.3