Эх сурвалжийг харах

add currently connected server to motd

Blaine 2 жил өмнө
parent
commit
be474ee9b5

+ 6 - 0
plays/restart-vpn.yml

@@ -32,6 +32,12 @@
         name: wg-quick@{{ wg_interface }}
         name: wg-quick@{{ wg_interface }}
         state: restarted
         state: restarted
 
 
+    - name: Edit /etc/motd
+      lineinfile:
+        path: /etc/motd
+        regex: "^VPN Traffic tunneled through server: "
+        line: "VPN Traffic tunneled through server: {{ wg_info.name }}"
+
     - name: Restart unbound
     - name: Restart unbound
       systemd:
       systemd:
         name: unbound
         name: unbound