19 lines
479 B
YAML
19 lines
479 B
YAML
- name: Install wireguard
|
|
become: true
|
|
apt:
|
|
name: wireguard
|
|
state: present
|
|
- name: Install home.conf
|
|
become: true
|
|
template:
|
|
src: "{{ role_path }}/templates/wg.conf.j2"
|
|
dest: "/etc/wireguard/{{ item.name }}.conf"
|
|
loop: "{{ wireguard_interfaces }}"
|
|
- name: Enable interfaces
|
|
become: true
|
|
systemd:
|
|
name: "wg-quick@{{ item.name }}"
|
|
enabled: true
|
|
state: started
|
|
when: '"always" in item and item.always'
|
|
loop: "{{ wireguard_interfaces }}"
|