add xml parse

This commit is contained in:
2026-03-19 23:49:16 +08:00
parent 8b279df333
commit 230d3d4204
38 changed files with 2736 additions and 9 deletions

38
config/main.toml Normal file
View File

@@ -0,0 +1,38 @@
# 全局配置
linux_distro = "centos"
linux_version = "8"
# XML配置路径相对路径基于main.toml所在目录
xml_paths = [
"xml/kickstart",
"xml/packages"
]
# 全局变量
[variables]
domain = "sunhpc.local"
ntp_server = "ntp.sunhpc.local"
dns_server = "192.168.1.1"
root_password = "111111"
# 节点配置
[nodes]
[nodes.common]
arch = "x86_64"
linux_distro = "centos"
linux_version = "8"
[nodes.common.variables]
network_interface = "eth0"
ip_prefix = "192.168.1."
[nodes.compute]
inherit = "common"
[nodes.compute.variables]
ip_suffix = "100"
hostname = "compute-01"
[nodes.storage]
inherit = "common"
[nodes.storage.variables]
ip_suffix = "200"
hostname = "storage-01"