enable vpn interface

This commit is contained in:
Jean-Marie Mineau 2021-04-22 23:09:49 +02:00
parent 4346b49e62
commit 7cfe1091d5
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
- name: Reload wireguard for interface
systemd:
name: "wg-quick@{{ item.key }}"
state: reloaded

View file

@ -24,3 +24,12 @@
mode: '600' mode: '600'
loop: loop:
- "{{ lookup('dict', vpn_interfaces) }}" - "{{ lookup('dict', vpn_interfaces) }}"
notify: Reload wireguard for interface
- name: Enable interface
systemd:
name: "wg-quick@{{ item.key }}"
state: started
enabled: yes
loop:
- "{{ lookup('dict', vpn_interfaces) }}"