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 <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-15 15:44:30 +02:00
parent f2be2f7b95
commit 7760066325
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8

View file

@ -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: