ansible-playbooks

ansible-playbooks is a skill for Claude Code from sawrus/agent-guides. It costs 29 tokens per session (1,139 once invoked), scanned A, original, MIT.

Ansible guidance for writing playbooks and roles that configure servers, prepare Kubernetes nodes, and bootstrap applications. Idempotent means repeated runs make only needed changes.

In plain words
What is it for?
Use it to manage operating-system settings, install packages, provision bare-metal Kubernetes nodes, rotate OS credentials, and test Ansible roles.
Why use it?
It helps you automate server setup consistently without repeatedly changing systems that are already configured.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to manage operating-system settings, install packages, provision bare-metal Kubernetes nodes, rotate OS credentials, and test Ansible roles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/ansible-playbooks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sawrus/agent-guides --skill ansible-playbooks
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ansible-playbooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/ansible-playbooks/github.svg)](https://agentmods.dev/skills/sawrus/agent-guides/ansible-playbooks)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/ansible-playbooks"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/ansible-playbooks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ansible-playbooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/sawrus/agent-guides/ansible-playbooks"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/ansible-playbooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,139 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.01139
Opus 5 $0.00015 $0.00570
Sonnet 5 $0.00006 $0.00228
Haiku 4.5 $0.00003 $0.00114

Measured 11d ago against content hash 4e0c1422d4ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ansible-playbooks scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- curl
areas/devops/infrastructure/skills/ansible-playbooks/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Ansible Playbooks

Expertise: Idempotent roles, inventory patterns, Vault integration, molecule testing, bare-metal K8s node prep.

When to load

When configuring bare-metal servers, provisioning K8s nodes, managing OS-level config, or rotating OS credentials.

Role Structure (Standard)

roles/base-server/
├── tasks/
│   ├── main.yml         ← imports sub-task files
│   ├── packages.yml
│   ├── sysctl.yml
│   └── users.yml
├── defaults/
│   └── main.yml         ← all variables with sensible defaults
├── vars/
│   └── main.yml         ← internal constants (not overridable)
├── templates/
│   └── sysctl.conf.j2
├── handlers/
│   └── main.yml         ← restart services on change
└── meta/
    └── main.yml         ← role dependencies

Idempotency Patterns

# ✅ Package install — idempotent
- name: Install required packages
  ansible.builtin.apt:
    name:
      - containerd
      - curl
      - jq
    state: present
    update_cache: true
  when: ansible_os_family == "Debian"

# ✅ File with checksum validation — only copies if changed
- name: Configure containerd
  ansible.builtin.template:
    src: containerd-config.toml.j2
    dest: /etc/containerd/config.toml
    owner: root
    group: root
    mode: "0644"
  notify: Restart containerd     # handler only fires if file changed

# ✅ Service management
- name: Enable and start containerd
  ansible.builtin.systemd:
    name: containerd
    enabled: true
    state: started
    daemon_reload: true

Handlers Pattern

# handlers/main.yml
- name: Restart containerd
  ansible.builtin.systemd:
    name: containerd
    state: restarted

- name: Reload sysctl
  ansible.builtin.command: sysctl --system
  changed_when: false

Inventory Structure

# inventory/production/hosts.ini
[control_plane]
cp-01 ansible_host=192.168.10.10
cp-02 ansible_host=192.168.10.11
cp-03 ansible_host=192.168.10.12

[workers]
worker-01 ansible_host=192.168.10.20
worker-02 ansible_host=192.168.10.21

[k8s_cluster:children]
control_plane
workers

[k8s_cluster:vars]
ansible_user=ubuntu
ansible_ssh_private_key_file=~/.ssh/infra-key
ansible_python_interpreter=/usr/bin/python3

Read the full file on GitHub · 175 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 175 lines · 29 tokens per session scan A 4e0c1422d4ff

Subscribe to this mod's changes

ansible-playbooks is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 10d ago), licensed MIT. It adds 29 tokens to every session and 1,139 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.