From 776006632511cef0d3117730ce85f6284f5b19c5 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Mon, 15 Jul 2024 15:44:30 +0200 Subject: [PATCH] fix(wg): correct path to config and variable * use correct path to the template for the config * use correct variable when adjusting the DNS on AlmaLinux Signed-off-by: Matej Focko --- roles/wg/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/wg/tasks/main.yml b/roles/wg/tasks/main.yml index 714de6a..4f5767a 100644 --- a/roles/wg/tasks/main.yml +++ b/roles/wg/tasks/main.yml @@ -41,7 +41,7 @@ gateway: "{{ wg_gateway }}" peers: "{{ wg_peers }}" ansible.builtin.template: - src: "{{ wg_ifname }}.conf" + src: "templates/wg.conf" dest: "/etc/wireguard/{{ wg_ifname }}.conf" owner: root group: root @@ -49,7 +49,7 @@ - name: Set up the DNS on AlmaLinux ansible.builtin.include_tasks: "dns_{{ ansible_distribution }}.yml" - when: domain and ansible_distribution == "AlmaLinux" + when: wg_domain and ansible_distribution == "AlmaLinux" - name: Enable and start the wireguard connection ansible.builtin.service: