Browse Source

template issues

aeth 9 months ago
parent
commit
2171699eaf
2 changed files with 9 additions and 9 deletions
  1. 5 5
      templates/wg0.conf.j2
  2. 4 4
      templates/wireguard.client.j2

+ 5 - 5
templates/wg0.conf.j2

@@ -1,8 +1,8 @@
 [Interface]
-Address = {{ ansible_facts['vpn_network_address'] }}
+Address = {{ vpn_network_address }}
 SaveConfig = true
-ListenPort = {{ ansible_facts['vpn_server_port'] }}
-PrivateKey = {{ ansible_facts['vpn_private_key_content'] }}
-PostUp     = firewall-cmd --zone=public --add-port {{ ansible_facts['vpn_server_port'] }}/udp && firewall-cmd --zone=public --add-masquerade
-PostDown   = firewall-cmd --zone=public --remove-port {{ ansible_facts['vpn_server_port'] }}/udp && firewall-cmd --zone=public --remove-masquerade
+ListenPort = {{ vpn_server_port }}
+PrivateKey = {{ vpn_private_key_content }}
+PostUp     = firewall-cmd --zone=public --add-port {{ vpn_server_port }}/udp && firewall-cmd --zone=public --add-masquerade
+PostDown   = firewall-cmd --zone=public --remove-port {{ vpn_server_port }}/udp && firewall-cmd --zone=public --remove-masquerade
 

+ 4 - 4
templates/wireguard.client.j2

@@ -1,10 +1,10 @@
 [Interface]
-PrivateKey = {{ ansible_facts['vpn_client_private_key'] }}
-Address = {{ ansible_facts['vpn_client_address'] }}
+PrivateKey = {{ vpn_client_private_key }}
+Address = {{ vpn_client_address }}
 
 
 [Peer]
-PublicKey = {{ ansible_facts['vpn_server_public_key'] }}
-Endpoint = {{ ansible_facts['vpn_server_wan_address'] }}:{{ ansible_facts['vpn_server_port'] }}
+PublicKey = {{ vpn_server_public_key }}
+Endpoint = {{ vpn_server_wan_address }}:{{ vpn_server_port }}
 AllowedIPs = 0.0.0.0/0