2024-02-15 09:48:28 +01:00
|
|
|
---
|
|
|
|
- name: Ensure package exists
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name:
|
|
|
|
- wireguard
|
|
|
|
state: present
|
2024-02-15 10:01:37 +01:00
|
|
|
notify:
|
|
|
|
- Ensure resolvconf is configured
|
2024-02-15 09:58:19 +01:00
|
|
|
|
2024-02-15 09:48:28 +01:00
|
|
|
- name: Ensure profiles are templated
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "wg.conf.j2"
|
|
|
|
dest: "{{ wireguard_conf_dir }}/{{ item.name }}.conf"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0600"
|
|
|
|
when:
|
|
|
|
- wireguard_profiles is defined
|
|
|
|
loop: wireguard_profiles
|
|
|
|
...
|