range-config

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ludus 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

核心原则

  1. 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
  2. Use
    {{ range_id }}
    template strings
    in vm_name and hostname fields. This resolves to the user's range ID (e.g., "JS").
  3. Windows hostnames are limited to 15 characters due to NETBIOS.
  4. VLANs must be 2-255 and become the third octet of the VM's IP (e.g., vlan 10 = 10.X.10.Y).
  5. ip_last_octet must be unique within a VLAN.
  6. Set
    linux: true
    for Linux VMs,
    windows:
    key
    for Windows VMs,
    macOS: true
    for macOS VMs.
  7. Domain roles are:
    primary-dc
    ,
    alt-dc
    , or
    member
    .
  8. role_vars must be a dictionary - do not use hyphens to prefix variables.
  9. Roles must exist on the server before deploy — verify installed roles and add any that are missing.
  1. 始终建议在配置顶部添加YAML schema验证头
    yaml
    # yaml-language-server: $schema=https://docs.ludus.cloud/schemas/range-config.json
  2. 在vm_name和hostname字段中使用
    {{ range_id }}
    模板字符串
    。它会解析为用户的范围ID(例如"JS")。
  3. Windows主机名受NETBIOS限制,最多15个字符
  4. VLAN必须为2-255,并成为VM IP的第三个八位字节(例如,VLAN 10 = 10.X.10.Y)。
  5. ip_last_octet在同一VLAN内必须唯一
  6. Linux VM设置
    linux: true
    ,Windows VM使用**
    windows:
    键**,macOS VM设置**
    macOS: true
    **。
  7. 域角色包括:
    primary-dc
    alt-dc
    member
  8. role_vars必须为字典——不要使用连字符作为变量前缀。
  9. 部署前,角色必须已存在于服务器上——验证已安装的角色并添加任何缺失的角色。

Workflow

工作流程

  1. Clarify the target environment and intended use case.
  2. Define required VMs and roles.
  3. Verify that required templates are available on the server.
  4. Build or revise YAML in small, valid increments.
  5. Propose network rules and testing behavior appropriate for the scenario.
  6. Verify that required Ansible roles/collections are installed; recommend any that need to be added.
  7. Validate structure and values against the schema reference.
  1. 明确目标环境和预期用例。
  2. 定义所需的VM和角色。
  3. 验证服务器上是否有可用的所需模板。
  4. 以小的、有效的增量构建或修订YAML。
  5. 提出适合场景的网络规则和测试行为。
  6. 验证所需的Ansible角色/集合是否已安装;建议添加任何需要的内容。
  7. 根据schema参考验证结构和值。

References

参考资料

  • Use
    references/schema.md
    for full schema details, valid values, defaults, and complete examples.
  • Use
    https://docs.ludus.cloud/docs/configuration
    for official configuration guidance.
  • Use
    https://docs.ludus.cloud/schemas/range-config.json
    for schema-backed validation.
  • 使用
    references/schema.md
    获取完整的schema细节、有效值、默认值和完整示例。
  • 使用
    https://docs.ludus.cloud/docs/configuration
    获取官方配置指南。
  • 使用
    https://docs.ludus.cloud/schemas/range-config.json
    进行基于schema的验证。