agentleFS
ldaumeldaume/agentic-engineering-harness/skills/infrastructure/ansible-automation/SKILL.md

ansible-automation

Skill3 starsChanged 3 months agoMITView on GitHub

Designs, reviews, and troubleshoots Ansible inventories, playbooks, roles, variables, vault usage, idempotency, and server automation. Use when managing infrastructure with Ansible, writing playbooks, organizing roles, handling SSH inventories, templating configs, or making repeatable operations safe.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this for repeatable server and infrastructure operations with Ansible.

    line 8
  2. Distinctive:

    Read inventories, group vars, host vars, roles, collections, vault policy, runbooks, and CI jobs.

    line 14
  3. Distinctive:

    Do not run against production without confirmation of inventory and limit.

    line 19
  4. Distinctive:

    Treat secrets as vault or external secret-manager material, never plain vars.

    line 20
  5. Distinctive:

    Use handlers for service reloads/restarts.

    line 25
  6. Distinctive:

    Prefer modules over shell commands.

    line 26
  7. Very specific:

    If shell is necessary, add creates, removes, changed_when, or failed_when.

    line 27
  8. Distinctive:

    Keep templates minimal and render from explicit vars.

    line 29
  9. Distinctive:

    Use tags for operational subsets only when they remain safe alone.

    line 30
  10. Distinctive:

    Keep environments explicit: staging, production, homelab, or similar.

    line 38
  11. Distinctive:

    Use group vars for shared policy and host vars for true host differences.

    line 39
  12. Distinctive:

    Avoid embedding secrets or personal paths in inventory.

    line 40
  13. Distinctive:

    Document required external vars and vault files.

    line 41
  14. Distinctive:

    Use check mode cautiously.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Ansible Automation

Use this for repeatable server and infrastructure operations with Ansible.

Project Fit Check

Before changing automation:

  1. Read inventories, group vars, host vars, roles, collections, vault policy, runbooks, and CI jobs.
  2. Identify target hosts, privilege escalation model, SSH user, environment, and whether changes are safe to run repeatedly.
  3. Preserve existing variable naming, role layout, and collection versions.
  4. Do not run against production without confirmation of inventory and limit.
  5. Treat secrets as vault or external secret-manager material, never plain vars.

Playbook Rules

  • Make tasks idempotent; repeated runs should converge without surprise.
  • Use handlers for service reloads/restarts.
  • Prefer modules over shell commands.
  • If shell is necessary, add creates, removes, changed_when, or failed_when.
  • Keep templates minimal and render from explicit vars.
  • Use tags for operational subsets only when they remain safe alone.
  • Scope no_log to the task that carries the secret. On a whole task it censors the failure message along with the secret, so a failed run reports nothing usable. Split it: non-secret arguments in a logged task, the secret argument in its own.

Inventory Rules

  • Keep environments explicit: staging, production, homelab, or similar.
  • Use group vars for shared policy and host vars for true host differences.
  • Avoid embedding secrets or personal paths in inventory.
  • Document required external vars and vault files.

Verification

ansible-playbook --syntax-check playbook.yml
ansible-playbook --check --diff playbook.yml
ansible-playbook --limit <safe-target> playbook.yml

Use check mode cautiously; not every module predicts changes perfectly.

Red Flags

  • raw shell task where a module exists
  • production inventory selected by default
  • secret in plaintext YAML
  • restart on every run
  • unbounded hosts: all for risky changes
  • task depends on local machine state without documenting it
  • no_log on a task whose failure message you still need to read

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.