homeserver/roles/mgrote_wireguard/tasks/main.yml
2024-04-02 16:12:27 +02:00

22 lines
457 B
YAML

---
- name: Ensure package exists
become: true
ansible.builtin.package:
name:
- wireguard
state: present
notify:
- Ensure resolvconf is configured
- 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
...