systemd units for wg interfaces
This commit is contained in:
parent
2ecd42e474
commit
e4d80ec703
2 changed files with 9 additions and 0 deletions
|
@ -9,3 +9,11 @@
|
|||
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 }}"
|
||||
|
|
Reference in a new issue