Browse Source

update restartvpn script

Blaine Story 2 năm trước cách đây
mục cha
commit
a546f0c501
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      plays/restart-vpn.yml

+ 5 - 2
plays/restart-vpn.yml

@@ -2,6 +2,9 @@
 - hosts: dhcp
   become: True
   gather_facts: False
+  vars:
+    wg_allowed_ips: '0.0.0.0/0,::0/0'
+
   tasks:
     - name: Load potential endpoints
       include_vars:
@@ -22,14 +25,14 @@
     - name: Update wireguard config
       template:
         src: ../roles/wg-gateway/templates/wg.conf.j2
-        dest: /etc/wireguard/{{ wg_interface }}.conf
+        dest: /etc/wireguard/wg0.conf
         owner: root
         group: root
         mode: '0644'
 
     - name: Restart wireguard interface
       systemd:
-        name: wg-quick@{{ wg_interface }}
+        name: wg-quick@wg0
         state: restarted
 
     - name: Edit /etc/motd