From 8eedcebe0feb7e90933235e85132045c387e522d Mon Sep 17 00:00:00 2001 From: Virgile Retault Date: Thu, 21 Jul 2022 18:51:45 +0200 Subject: [PATCH] added toggle to no_log --- host_vars/hindley/main.yml | 15 ++++++++------- roles/vpn/templates/wiregard.conf.j2 | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/host_vars/hindley/main.yml b/host_vars/hindley/main.yml index 841ce7e..71da82a 100644 --- a/host_vars/hindley/main.yml +++ b/host_vars/hindley/main.yml @@ -31,22 +31,23 @@ vpn_interfaces: public_key: "Ce48/ZdvpI2S82bIivhiWHQsyidzTAtxCnEYojY3xEA=" keepalive: false peers: - - endpoint: "" - public_key: "jvjOCj5xVTLwyQ8o7QsYvF2ep1HbD/GKnmjpqJuztB8=" + - public_key: "jvjOCj5xVTLwyQ8o7QsYvF2ep1HbD/GKnmjpqJuztB8=" allowed_ips: - "{{ intranet.subnets.physical.subnets.router_hellman.ipv4 }}/{{ intranet.subnets.physical.subnets.router_hellman.netmaskv4 }}" - "{{ intranet.subnets.guest_hellman.ipv4 }}/{{ intranet.subnets.guest_hellman.netmaskv4 }}" comment: "Router hosted on Hellman" - - endpoint: "" - public_key: "{{ vpn_guest_keys.knuth }}" + - public_key: "{{ vpn_guest_keys.knuth }}" allowed_ips: - "{{ intranet.subnets.guest.subnets.knuth.ipv4 }}/{{ intranet.subnets.guest.subnets.knuth.netmaskv4 }}" comment: "Client laptop: knuth" - - endpoint: "" - public_key: "{{ hostvars['matrix_server'].vpn_interfaces.wg0.public_key }}" + - public_key: "{{ hostvars['sulfur'].vpn_interfaces.wg0.public_key }}" allowed_ips: - - "{{ hostvars['matrix_server'].vpn_interfaces.wg0.ip }}/32" + - "{{ hostvars['sulfur'].vpn_interfaces.wg0.ip }}/32" comment: "matrix VM, hosted on g33kex's server" + - public_key: "{{ hostvars['technetium'].vpn_interfaces.wg0.ip }}/32" + allowed_ips: + - "{{ hostvars['technetium'].vpn_interfaces.wg0.ip }}/32" + comment: "test VM" # apt proxy proxy_apt_interfaces: diff --git a/roles/vpn/templates/wiregard.conf.j2 b/roles/vpn/templates/wiregard.conf.j2 index 7f6af40..3b43127 100644 --- a/roles/vpn/templates/wiregard.conf.j2 +++ b/roles/vpn/templates/wiregard.conf.j2 @@ -9,7 +9,7 @@ ListenPort = {{ vpn_port }} [Peer] {{ peer.comment | comment }} Publickey = {{ peer.public_key }} -{% if peer.endpoint %} +{% if peer.endpoint is defined %} Endpoint = {{ peer.endpoint }}:{{ vpn_port }} {% endif %} AllowedIPs = {{ peer.allowed_ips | join(", ") }}