feat: select internal VPN IP for awareness to satisfy compliance filters

This commit is contained in:
Rui
2026-05-17 03:21:25 +02:00
parent 630c1f4b60
commit 8d6db6edbb
+2 -1
View File
@@ -153,7 +153,8 @@ class SwarmAgent:
self.setup_workspace()
# Identificação de Localização Automática
vps_ip = subprocess.getoutput("hostname -I").split()[0]
ips = subprocess.getoutput("hostname -I").split()
vps_ip = next((ip for ip in ips if ip.startswith("10.99.")), ips[0] if ips else "127.0.0.1")
vps_name = subprocess.getoutput("hostname")
# Carrega a Doutrina de Agentes