small changes to vpn

This commit is contained in:
Jean-Marie Mineau 2021-04-23 09:16:33 +02:00
parent faa50f9b36
commit 771a67df7d
3 changed files with 8 additions and 7 deletions

View file

@ -18,6 +18,6 @@ vpn_interfaces:
comment: "hellman"
- endpoint: ""
public_key: "NVKyKcX6PEEApSZvAwnT9gfMmMo6o5Go5FtzEPvh+y8="
allowed_ip: "172.20.1.200"
allowed_ip: "172.20.200.1"
allowed_mask: 32
comment: "knuth"
comment: "Client laptop: knuth"

View file

@ -1,8 +1,9 @@
---
# This is so uggly
- name: Reload wireguard for interface
- name: Restart wireguard for interface
systemd:
name: "wg-quick@{{ item }}"
state: reloaded
name: "wg-quick@{{ item.key }}"
state: restarted
loop:
- "{{ vpn_interfaces.key() }}"
- "{{ lookup('dict', vpn_interfaces) }}"
no_log: true

View file

@ -34,7 +34,7 @@
owner: root
group: root
mode: '600'
notify: Reload wireguard for interface
notify: Restart wireguard for interface
loop:
- "{{ lookup('dict', vpn_interfaces) }}"
no_log: true