一键导入
add-host-group
Add a new host or host group to an Ansible-managed infrastructure repo. Detects current progress and routes to the appropriate phase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a new host or host group to an Ansible-managed infrastructure repo. Detects current progress and routes to the appropriate phase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Creates directed workflow files for any repository. Generates structured markdown that AI agents execute interactively to guide users through multi-step configuration processes like service onboarding, environment setup, and infrastructure provisioning. Use when asked to create a directed workflow, encode a process, or build an agent-guided configuration flow.
Grant access to a new contributor. Detects current progress and routes to the appropriate phase.
Onboard a new service to a Kubernetes platform. Detects current onboarding progress and routes to the appropriate phase.
Provision a new AWS account in a Terraform-managed infrastructure repo. Detects current progress and routes to the appropriate phase.
| name | add-host-group |
| description | Add a new host or host group to an Ansible-managed infrastructure repo. Detects current progress and routes to the appropriate phase. |
| metadata | {"author":"platform-team","version":"2.0"} |
| compatibility | Works with any AI IDE that supports file references. Requires ansible-lint and yamllint for local validation. No SSH access needed -- the workflow produces inventory and playbook files validated locally. |
Walk through the complete process of adding a new host or host group to your Ansible infrastructure repo. This workflow produces small, focused pull requests -- one per phase.
group_vars as reference. Do not invent structure -- derive it from what already exists in the repo.main before invoking this workflow (or git pull if working on a direct clone). Progress detection relies on files merged to the upstream primary branch -- not local commits, uncommitted changes, or prior session output. If you generated files in a previous session that haven't been merged yet, they don't count as completed work.Ask (all questions upfront):
web-servers, db-primary)After getting the group name and environment, inspect the repository to determine what's already been completed. Detection must be based on files merged to the primary branch -- not on local uncommitted files, unmerged feature branches, or content from prior chat sessions. If a file was generated in a previous session but its PR hasn't merged, that phase is not complete.
| Check | What to Look For | Indicates |
|---|---|---|
| Inventory entry | inventory/{environment}/hosts.yml contains the group | Phase 1 complete |
| Group vars | inventory/{environment}/group_vars/{group-name}.yml | Phase 2 complete |
| Playbook | playbooks/{group-name}.yml | Phase 3 complete |
| Detected State | Recommended Action |
|---|---|
| Group not in inventory | Start at Phase 1 |
| Group in inventory, no group_vars | Continue at Phase 2 |
| Group vars exist, no playbook | Continue at Phase 3 |
| Playbook exists | Setup complete |
Ask: "Based on my analysis, you appear to be at [detected phase]. Would you like to:
| User Choice | Action |
|---|---|
| Continue detected phase | Load the corresponding phase file |
| Different phase | Ask which phase, then load that file |
| Review configuration | Summarize existing files, then ask which phase |
| Scenario | Phases |
|---|---|
| Single host | 1 → 2 → 3 |
| Group of hosts | 1 → 2 → 3 (multiple hosts added in Phase 1) |
| Phase | File | Description | PR |
|---|---|---|---|
| 1 | references/phase-01-inventory.md | Add host(s) to environment inventory | 1 |
| 2 | references/phase-02-group-vars.md | Group variables, vault-encrypted secrets | 1 |
| 3 | references/phase-03-playbook.md | Playbook targeting the group with roles | 1 |