feat: report running_kernel (uname -r) in get_facts

This commit is contained in:
Christian Manivong
2026-08-23 19:06:10 +07:00
parent 7faaafb7a3
commit d33739832b
+5
View File
@@ -384,6 +384,10 @@ class LinuxDriver(OSDriver):
iface_out = self._send("ip -o link show | awk -F': ' '{print $2}' | cut -d@ -f1")
interface_list = [i.strip() for i in iface_out.splitlines() if i.strip() and i.strip() != "lo"]
# Currently-booted kernel release, distinct from an installed-but-not-yet-
# booted newer kernel (used for kernel CVE relevance).
running_kernel = self._send("uname -r").strip()
return {
"hostname": hostname,
"fqdn": fqdn,
@@ -393,6 +397,7 @@ class LinuxDriver(OSDriver):
"os_version": os_version,
"uptime": uptime_secs,
"interface_list": interface_list,
"running_kernel": running_kernel,
}
def _parse_uptime(self) -> int: