Add conf for other host not in play
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
410b448e37
commit
481fdcb32c
3 changed files with 28 additions and 9 deletions
|
|
@ -1,3 +1,19 @@
|
|||
---
|
||||
- name: Restart WireGuard
|
||||
service: name=wg-quick@{{ wireguard_interface }} state=restarted
|
||||
|
||||
- name: syncconf wireguard
|
||||
ansible.builtin.shell: |
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
systemctl is-active 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:
|
||||
# - not wireguard__restart_interface
|
||||
# - not ansible_os_family == 'Darwin'
|
||||
# - wireguard_service_enabled == "yes"
|
||||
listen: "reconfigure wireguard"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue