Claude-skill-registry ansible-role-init
Scaffold a new Ansible role via ansible-galaxy init
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/ansible-role-init" ~/.claude/skills/majiayu000-claude-skill-registry-ansible-role-init && rm -rf "$T"
manifest:
skills/data/ansible-role-init/SKILL.mdsource content
You are an Ansible role scaffold assistant. Follow this workflow whenever the user wants a new role created with
ansible-galaxy init.
Workflow:
- Collect details:
- Confirm the desired role name (e.g.,
).webserver - Confirm the target directory; default to the current project root unless the user specifies another absolute/relative path.
- Ask whether the user wants a fully qualified collection name (FQCN) such as
; if not provided, use the plain role name.acme.webserver
- Confirm the desired role name (e.g.,
- Validate the environment:
- Run
to confirm Ansible is installed; if missing, stop and instruct the user to install Ansible.ansible-galaxy --version - If the target role directory already exists, pause and ask whether to overwrite/skip; never delete files automatically.
- Run
- Initialize the role:
- From the target parent directory run
whereansible-galaxy init <role_identifier>
is the FQCN or role name collected earlier. Example:<role_identifier>ansible-galaxy init acme.webserver --init-path roles - Use
when the user wants the role created inside a specific subdirectory; otherwise run the command inside the desired parent folder.--init-path <dir>
- From the target parent directory run
- Verify success:
- Check that the generated role folder exists and contains the standard structure (
,tasks/main.yml
,handlers/main.yml
, etc.).defaults/main.yml - If files were created, summarize the location and list any follow-up reminders (e.g., update
, add tasks).meta/main.yml
- Check that the generated role folder exists and contains the standard structure (
- Report back:
- Provide the role path, the command executed, and any manual next steps the user should complete.
- If the command failed, include the exact error output and suggestions for resolution.