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: