/ansible-skills:ansible-interactivefrom ansible-skills
Guides interactive Ansible development: environment analysis, project setup, connectivity testing, incremental playbook building, and validation cycles. For new projects, hands-on teaching, and troubleshooting.
Ships in ansible-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Interactive development builds automation incrementally with continuous validation. Each component is tested before adding the next. This catches errors early when they're easy to diagnose.
Gather before writing any code:
| Question | Why It Matters |
|---|---|
| How many servers? | Affects inventory organization |
| IP addresses/hostnames? | Required for inventory |
| SSH user and key location? | Connection configuration |
| Password or key auth? | Determines SSH setup |
| Sudo with or without password? | Privilege escalation config |
| Server roles (web, db, app)? | Inventory grouping |
| Operating systems? | Module selection (apt vs yum) |
Verify Ansible is installed: ansible --version
Create minimal structure:
mkdir ansible-project && cd ansible-project
ansible.cfg:
[defaults]
inventory = ./inventory
host_key_checking = False
stdout_callback = yaml
[privilege_escalation]
become = True
become_method = sudo
inventory:
[webservers]
web1 ansible_host=192.168.1.10 ansible_user=admin ansible_ssh_private_key_file=~/.ssh/id_rsa
[dbservers]
db1 ansible_host=192.168.1.20 ansible_user=admin ansible_ssh_private_key_file=~/.ssh/id_rsa
Always test before writing playbooks:
ansible all -m ping
| Result | Action |
|---|---|
| SUCCESS | Proceed to playbooks |
| UNREACHABLE | Check ssh -v user@host |
| Permission denied | Verify key path, permissions (600) |
| Sudo password required | Add --ask-become-pass or configure NOPASSWD |
Start simple, add one task at a time:
# playbook.yml - start with facts
---
- hosts: all
tasks:
- name: Show OS info
ansible.builtin.debug:
msg: "{{ ansible_distribution }} {{ ansible_distribution_version }}"
Run: ansible-playbook playbook.yml
Then add tasks one by one, testing after each:
- name: Ensure nginx installed
ansible.builtin.package:
name: nginx
state: present
Run again. Fix any errors before adding more.
After each change:
ansible-playbook --syntax-check playbook.ymlansible-playbook --check --diff playbook.ymlansible-playbook playbook.ymlchanged=0 (idempotency)--check before real runsWhen guiding users:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cruftyoldsysadmin/ansible-skills --plugin ansible-skills4 skills in this plugin
/ansible-convertUse when converting shell scripts to Ansible playbooks. Use when migrating bash automation, manual procedures, or Dockerfiles to idempotent Ansible tasks./ansible-debugUse when playbooks fail with UNREACHABLE, permission denied, MODULE FAILURE, or undefined variable errors. Use when SSH connections fail or sudo password is missing./ansible-playbookUse when creating playbooks, roles, or inventory files. Use when automating infrastructure with Ansible. Use when encountering YAML syntax errors, module failures, or variable precedence issues.Other plugins' skills for the same job