Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions coriolis/osmorphing/osdetect/centos.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
LOG = logging.getLogger(__name__)
CENTOS_DISTRO_IDENTIFIER = "CentOS"
CENTOS_STREAM_DISTRO_IDENTIFIER = "CentOS Stream"
ALMA_IDENTIFIER = "AlmaLinux"


class CentOSOSDetectTools(base.BaseLinuxOSDetectTools):
Expand All @@ -26,10 +27,11 @@ def detect_os(self):
release_info[0].strip())
if m:
distro, version, _, _ = m.groups()
if CENTOS_DISTRO_IDENTIFIER not in distro:
if (CENTOS_DISTRO_IDENTIFIER not in distro and
ALMA_IDENTIFIER not in distro):
LOG.debug(
"Distro does not appear to be a CentOS: %s",
distro)
"Distro does not appear to be a CentOS or Alma: "
f"{distro}")
return {}

distribution_name = CENTOS_DISTRO_IDENTIFIER
Expand Down