range-config
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLudus Range Configuration
Ludus 范围配置
Use this skill to build safe, valid Ludus YAML configurations and explain tradeoffs in topology, networking, and role design.
使用此技能构建安全、有效的Ludus YAML配置,并解释拓扑、网络和角色设计中的权衡。
Key Principles
核心原则
-
Always suggest the YAML schema validation header at the top of configs:yaml
# yaml-language-server: $schema=https://docs.ludus.cloud/schemas/range-config.json -
Usetemplate strings in vm_name and hostname fields. This resolves to the user's range ID (e.g., "JS").
{{ range_id }} -
Windows hostnames are limited to 15 characters due to NETBIOS.
-
VLANs must be 2-255 and become the third octet of the VM's IP (e.g., vlan 10 = 10.X.10.Y).
-
ip_last_octet must be unique within a VLAN.
-
Setfor Linux VMs,
linux: truekey for Windows VMs,windows:for macOS VMs.macOS: true -
Domain roles are:,
primary-dc, oralt-dc.member -
role_vars must be a dictionary - do not use hyphens to prefix variables.
-
Roles must exist on the server before deploy — verify installed roles and add any that are missing.
-
始终建议在配置顶部添加YAML schema验证头:yaml
# yaml-language-server: $schema=https://docs.ludus.cloud/schemas/range-config.json -
在vm_name和hostname字段中使用模板字符串。它会解析为用户的范围ID(例如"JS")。
{{ range_id }} -
Windows主机名受NETBIOS限制,最多15个字符。
-
VLAN必须为2-255,并成为VM IP的第三个八位字节(例如,VLAN 10 = 10.X.10.Y)。
-
ip_last_octet在同一VLAN内必须唯一。
-
Linux VM设置,Windows VM使用**
linux: true键**,macOS VM设置**windows:**。macOS: true -
域角色包括:、
primary-dc或alt-dc。member -
role_vars必须为字典——不要使用连字符作为变量前缀。
-
部署前,角色必须已存在于服务器上——验证已安装的角色并添加任何缺失的角色。
Workflow
工作流程
- Clarify the target environment and intended use case.
- Define required VMs and roles.
- Verify that required templates are available on the server.
- Build or revise YAML in small, valid increments.
- Propose network rules and testing behavior appropriate for the scenario.
- Verify that required Ansible roles/collections are installed; recommend any that need to be added.
- Validate structure and values against the schema reference.
- 明确目标环境和预期用例。
- 定义所需的VM和角色。
- 验证服务器上是否有可用的所需模板。
- 以小的、有效的增量构建或修订YAML。
- 提出适合场景的网络规则和测试行为。
- 验证所需的Ansible角色/集合是否已安装;建议添加任何需要的内容。
- 根据schema参考验证结构和值。
References
参考资料
- Use for full schema details, valid values, defaults, and complete examples.
references/schema.md - Use for official configuration guidance.
https://docs.ludus.cloud/docs/configuration - Use for schema-backed validation.
https://docs.ludus.cloud/schemas/range-config.json
- 使用获取完整的schema细节、有效值、默认值和完整示例。
references/schema.md - 使用获取官方配置指南。
https://docs.ludus.cloud/docs/configuration - 使用进行基于schema的验证。
https://docs.ludus.cloud/schemas/range-config.json