diff --git a/roles/wg_hub/tasks/main.yml b/roles/wg_hub/tasks/main.yml index 78551ea..669569f 100644 --- a/roles/wg_hub/tasks/main.yml +++ b/roles/wg_hub/tasks/main.yml @@ -29,7 +29,7 @@ PreUp = sysctl -w net.ipv4.ip_forward=1 {% if dns_server is defined %} - PostUp = resolvectl dns %i {{ dns_server }}; resolvectl domain %i {{ wg_hub_iface_name }}.local + PostUp = resolvectl dns %i {{ wg_hub_dns_server }}; resolvectl domain %i {{ wg_hub_iface_name }}.local {% endif %} PostDown = sysctl -w net.ipv4.ip_forward=0 @@ -44,11 +44,11 @@ owner: root group: root mode: "0600" - marker: "# {mark} ANSIBLE MANAGED SPOKE BLOCK: {{ domain_name }}" + marker: "# {mark} ANSIBLE MANAGED SPOKE BLOCK: {{ wg_hub_domain_name }}" block: | # - [Peer] # {{ domain_name }} - PublicKey = {{ item.wg_hub_wg_pubkey }} + [Peer] # {{ wg_hub_domain_name }} + PublicKey = {{ item.wg_pubkey }} PresharedKey = {{ item.wg_psk }} - AllowedIPs = {{ item.wg_hub_ipv4_vpn_addr }}/32 + AllowedIPs = {{ item.ipv4_vpn_addr }}/32 #