This repository has been archived on 2020-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
2018-08-12 20:21:45 +00:00
|
|
|
---
|
|
|
|
- name: restart wireguard
|
|
|
|
service:
|
2019-01-07 21:56:20 +00:00
|
|
|
name: "wg-quick@{{ wireguard_interface }}"
|
2018-08-12 20:21:45 +00:00
|
|
|
state: restarted
|
2020-01-26 22:30:16 +00:00
|
|
|
when: not wg_syncconf
|
|
|
|
listen: "reconfigure wireguard"
|
|
|
|
|
|
|
|
- name: syncconf wireguard
|
|
|
|
shell: |
|
|
|
|
systemctl is-active wg-quick@wg-quick@{{ wireguard_interface|quote }} || systemctl start wg-quick@{{ wireguard_interface|quote }}
|
|
|
|
wg syncconf {{ wireguard_interface|quote }} <(wg-quick strip /etc/wireguard/{{ wireguard_interface|quote }}.conf)
|
|
|
|
exit 0
|
|
|
|
args:
|
|
|
|
executable: "/bin/bash"
|
|
|
|
when: wg_syncconf
|
|
|
|
listen: "reconfigure wireguard"
|