Explorar o código

add currently connected server to motd

Blaine %!s(int64=2) %!d(string=hai) anos
pai
achega
be474ee9b5
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      plays/restart-vpn.yml

+ 6 - 0
plays/restart-vpn.yml

@@ -32,6 +32,12 @@
         name: wg-quick@{{ wg_interface }}
         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
       systemd:
         name: unbound