feat: report running_kernel (uname -r) in get_facts
Distinguishes the currently-booted kernel from a newer installed-but-not-yet- booted one, for kernel CVE relevance.
This commit is contained in:
@@ -431,6 +431,14 @@ class ProxmoxDriver(
|
||||
except Exception as exc:
|
||||
logger.debug("Failed to read DMI info via SSH: %s", exc)
|
||||
|
||||
# Currently-booted kernel release (uname -r) — distinct from any newer
|
||||
# kernel that is merely installed and pending a reboot.
|
||||
running_kernel = ""
|
||||
try:
|
||||
running_kernel = self._exec_ssh_command("uname -r").strip()
|
||||
except Exception as exc:
|
||||
logger.debug("Failed to read running kernel via SSH: %s", exc)
|
||||
|
||||
return {
|
||||
"uptime": uptime,
|
||||
"vendor": vendor or "Proxmox Server Solutions GmbH",
|
||||
@@ -440,6 +448,7 @@ class ProxmoxDriver(
|
||||
"os_version": os_version,
|
||||
"serial_number": serial,
|
||||
"interface_list": iface_list,
|
||||
"running_kernel": running_kernel,
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------ #
|
||||
|
||||
Reference in New Issue
Block a user