From 3ed84717a78d9bdbed5d58b8986f4bcddcf0420e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 29 Aug 2025 13:03:06 +0200 Subject: [PATCH] Solved wireguard name bugs --- roles/svc-net-wireguard-core/tasks/main.yml | 10 +++++----- roles/svc-net-wireguard-core/vars/main.yml | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/roles/svc-net-wireguard-core/tasks/main.yml b/roles/svc-net-wireguard-core/tasks/main.yml index 208a5419..1e974549 100644 --- a/roles/svc-net-wireguard-core/tasks/main.yml +++ b/roles/svc-net-wireguard-core/tasks/main.yml @@ -18,10 +18,10 @@ group: root notify: reload sysctl configuration -- name: create /etc/wireguard/wg0.{{ SOFTWARE_NAME | lower }}.conf +- name: "deploy {{ WG0_CONF_DEST }}" copy: - src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/etc/wireguard/wg0.conf" - dest: /etc/wireguard/wg0.{{ SOFTWARE_NAME | lower }}.conf - owner: root - group: root + src: "{{ [inventory_dir, 'files', inventory_hostname, 'etc/wireguard/wg0.conf' ] | path_join }}" + dest: "{{ WG0_CONF_DEST }}" + owner: root + group: root notify: restart wireguard \ No newline at end of file diff --git a/roles/svc-net-wireguard-core/vars/main.yml b/roles/svc-net-wireguard-core/vars/main.yml index c5d85a2d..bda3b5ee 100644 --- a/roles/svc-net-wireguard-core/vars/main.yml +++ b/roles/svc-net-wireguard-core/vars/main.yml @@ -1 +1,3 @@ application_id: svc-net-wireguard-core + +WG0_CONF_DEST: "/etc/wireguard/wg0.conf" \ No newline at end of file