agentleFS
realsigridjinrealsigridjin/hello-ansible-skills/skills/ansible-interactive/SKILL.md

ansible-interactive

Skill89 starsChanged 10 months agoMITView on GitHub

Use when guiding someone through Ansible setup step-by-step. Use when starting a new Ansible project from scratch. Use when teaching Ansible through hands-on development.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify Ansible is installed: ansible --version

    line 35
  2. Distinctive:

    Start simple, add one task at a time:

    line 83
  3. Distinctive:

    Run again. Fix any errors before adding more.

    line 106
  4. Very specific:

    Run again—verify changed=0 (idempotency)

    line 115
  5. Distinctive:

    Not testing SSH before writing playbooks

    line 122
  6. Distinctive:

    After completion, summarize what was done

    line 128
  7. Distinctive:

    When multiple approaches exist, present options with tradeoffs

    line 129

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Interactive Ansible Development

Overview

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.

When to Use

  • Setting up Ansible for a new environment
  • Teaching someone Ansible hands-on
  • Building playbooks incrementally with validation
  • Troubleshooting connectivity before automation

Development Phases

Phase 1: Environment Analysis

Gather before writing any code:

QuestionWhy 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

Phase 2: Project Setup

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

Phase 3: Connectivity Test

Always test before writing playbooks:

ansible all -m ping
ResultAction
SUCCESSProceed to playbooks
UNREACHABLECheck ssh -v user@host
Permission deniedVerify key path, permissions (600)
Sudo password requiredAdd --ask-become-pass or configure NOPASSWD

Phase 4: Incremental Playbook Development

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.

Phase 5: Validation Cycle

After each change:

  1. ansible-playbook --syntax-check playbook.yml
  2. ansible-playbook --check --diff playbook.yml
  3. ansible-playbook playbook.yml
  4. Run again—verify changed=0 (idempotency)

Red Flags - Stop and Debug

  • Adding multiple untested tasks at once
  • Skipping --check before real runs
  • Ignoring "changed" on second run
  • Not testing SSH before writing playbooks

Communication Pattern

When guiding users:

  • Explain what will happen before running commands
  • After completion, summarize what was done
  • When multiple approaches exist, present options with tradeoffs
  • Acknowledge progress at milestones

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.