aboutsummaryrefslogtreecommitdiff
path: root/tnet/wg-links-link.yml
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-06-12 21:14:09 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2024-06-12 21:14:09 +0200
commitb49b58d2749d50a42b25d39a744b0edc8d24bf77 (patch)
treea4aa115c23dde1cc02057b48e29be3336185718c /tnet/wg-links-link.yml
parentd1114cdc45c69ae8ae633790e85afe0e9d633015 (diff)
downloadinfra-b49b58d2749d50a42b25d39a744b0edc8d24bf77.tar.gz
infra-b49b58d2749d50a42b25d39a744b0edc8d24bf77.tar.bz2
infra-b49b58d2749d50a42b25d39a744b0edc8d24bf77.tar.xz
infra-b49b58d2749d50a42b25d39a744b0edc8d24bf77.zip
wip
Diffstat (limited to 'tnet/wg-links-link.yml')
-rw-r--r--tnet/wg-links-link.yml14
1 files changed, 13 insertions, 1 deletions
diff --git a/tnet/wg-links-link.yml b/tnet/wg-links-link.yml
index aaaf01f..6f1bb87 100644
--- a/tnet/wg-links-link.yml
+++ b/tnet/wg-links-link.yml
@@ -1,3 +1,9 @@
+- notify: systemctl restart systemd-networkd
+ become: yes
+ file:
+ path: "/etc/systemd/network/50-tnet-{{ inventory_hostname }}-{{ item.key }}.netdev"
+ state: absent
+
- name: "Make netdev for {{ inventory_hostname }} -> {{ item.key }}"
notify: systemctl restart systemd-networkd
become: yes
@@ -26,6 +32,12 @@
PersistentKeepalive=60
{% endif %}
+- notify: systemctl restart systemd-networkd
+ become: yes
+ file:
+ path: "/etc/systemd/network/50-tnet-{{ inventory_hostname }}-{{ item.key }}.network"
+ state: absent
+
- name: "Make network for {{ inventory_hostname }} -> {{ item.key }}"
notify: systemctl restart systemd-networkd
become: yes
@@ -38,4 +50,4 @@
Name=tnet-{{ item.key }}
[Network]
- Address={{ item.value.address }}/127
+ Address={{ item.value.address }}/64