3
0
Fork 0

add shell options to syncconf handler to fail fast in case of error

This commit is contained in:
githubixx 2020-02-04 22:13:16 +01:00
parent 8e7ed9e702
commit 09bb5e252f
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,9 @@
- name: syncconf wireguard
shell: |
set -o errexit
set -o pipefail
set -o nounset
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