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" comment: "hellman"
- endpoint: "" - endpoint: ""
public_key: "NVKyKcX6PEEApSZvAwnT9gfMmMo6o5Go5FtzEPvh+y8=" public_key: "NVKyKcX6PEEApSZvAwnT9gfMmMo6o5Go5FtzEPvh+y8="
allowed_ip: "172.20.1.200" allowed_ip: "172.20.200.1"
allowed_mask: 32 allowed_mask: 32
comment: "knuth" comment: "Client laptop: knuth"

View file

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

View file

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