feat: add CentOS Stream support to deployment and maintenance scripts

This commit is contained in:
2026-07-26 00:16:39 +02:00
parent 64e5b32514
commit 4c675cd634
5 changed files with 51 additions and 34 deletions
+9 -5
View File
@@ -4,8 +4,8 @@
"""Idempotent Zabbix 7.4 deployment with PostgreSQL 18, nginx, PHP-FPM.
Deploys a full Zabbix monitoring stack with TLS-secured frontend on Fedora
or openEuler. Every operation checks current state before acting; running
Deploys a full Zabbix monitoring stack with TLS-secured frontend on Fedora,
CentOS Stream or openEuler. Every operation checks current state before acting; running
the script repeatedly produces the same result with no errors and no
duplicate work.
@@ -45,10 +45,11 @@ GREEN = "\033[32m"
YELLOW = "\033[33m"
DIM = "\033[2m"
RESET = "\033[0m"
VERSION = "1.0.0"
VERSION = "1.1.0"
SUPPORTED_OS: dict[str, str] = {
"fedora": "Fedora",
"centos": "CentOS Stream",
"openeuler": "openEuler",
}
@@ -371,6 +372,9 @@ def _map_to_rhel_version(os_id: str, version_id: str) -> tuple[str, str]:
openEuler 24+ -> el9
openEuler 22 -> el8
"""
if os_id == "centos":
return (version_id, version_id)
if os_id == "fedora":
return ("9", "9")
@@ -462,7 +466,7 @@ def setup_postgresql(
"""Install and configure PostgreSQL 18. Idempotent."""
results: dict[str, Any] = {}
# Map to EL version for repo URLs (used for openEuler; Fedora has native
# Map to EL version for repo URLs (used for non-Fedora; Fedora has native
# PGDG reporpms).
el_major, _ = _map_to_rhel_version(os_id, version_id)
@@ -515,7 +519,7 @@ def setup_postgresql(
_status_done("not present")
else:
_status("PostgreSQL module disable")
_status_done("skipped (openEuler)")
_status_done("skipped (non-Fedora)")
# 2c. Install PostgreSQL 18 packages.
pg_packages = ["postgresql18-server", "postgresql18"]