Agent skill

Creating Ansible Playbooks

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Execute use when you need to work with Ansible automation. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check: notesDevOps & Cloud

Install Creating Ansible Playbooks

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill creating-ansible-playbooks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace creating-ansible-playbooks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/creating-ansible-playbooks .claude/skills/creating-ansible-playbooks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
creating-ansible-playbooks
GitHub stars
2.8k
Token cost
~1k tokens
SKILL.md length
425 words
Files
9 (incl. scripts, references, assets)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Execute use when you need to work with Ansible automation. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 9 steps: Scan the project for existing Ansible… → Determine the automation target: server… → Create the playbook YAML with proper… → …
  • You need to work with Ansible automation
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Runs Python and Shell scripts from its folder; calls ansible and ansible-playbook

What it does

Creating Ansible Playbooks is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute use when you need to work with Ansible automation. This skill provides Ansible playbook creation with comprehensive guidance and automation. Trigger with phrases like "create Ansible playbook", "automate with Ansible", or "configure with Ansible".

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts, reference files and assets (for example `assets/README.md`, `assets/playbook_template.yml` and `assets/validation_rules.yml`). Compatibility notes: Designed for Claude Code

It sits in DevOps & Cloud, covering Infrastructure as code. It works with Ansible. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • You need to work with Ansible automation
  • With phrases like create Ansible playbook
  • Automate with Ansible
  • Configure with Ansible

Example prompts

  • “create Ansible playbook”
  • “automate with Ansible”
  • “configure with Ansible”
  • “/creating-ansible-playbooks”

Requirements

  • Python 3
  • A Bash shell
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(ansible:*), Bash(terraform:*)

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Scan the project for existing Ansible files (ansible.cfg, inventory/, roles/, group_vars/) to understand current structure
  2. Determine the automation target: server provisioning, application deployment, configuration management, or security hardening
  3. Create the playbook YAML with proper structure: hosts, become, vars, tasks, handlers
  4. Extract reusable logic into roles using the standard directory layout (tasks/, handlers/, templates/, defaults/, vars/, meta/)
  5. Define variables in group_vars/ and host_vars/ for environment-specific values, keeping secrets in vault-encrypted files
  6. Use Jinja2 templates for configuration files that vary across environments
  7. Add handlers for service restarts triggered by configuration changes
  8. Validate the playbook with ansible-lint and ansible-playbook --check --diff (dry run)
  9. Test idempotency by running the playbook twice and confirming no changes on the second run

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(ansible:*)
    • Bash(terraform:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • ansible
    • ansible-playbook

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.ansible.com
    • galaxy.ansible.com
    • ansible.readthedocs.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Creating Ansible Playbooks loads about 1k tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 425 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:62
    denied` on become | Missing or incorrect sudo password | Add `--ask-become-pass` or configure `ansible_become_password`

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 425 words, ~1,044 tokens.

Download SKILL.mdSave it as .claude/skills/creating-ansible-playbooks/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
creating-ansible-playbooks
description
Execute use when you need to work with Ansible automation. This skill provides Ansible playbook creation with comprehensive guidance and automation. Trigger with phrases like "create Ansible playbook", "automate with Ansible", or "configure with Ansible".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(ansible:*), Bash(terraform:*)
compatibility
Designed for Claude Code
version
1.27.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
devops, ansible-playbooks

Creating Ansible Playbooks

Overview

Generate production-ready Ansible playbooks, roles, and inventories for infrastructure automation. Supports provisioning servers, deploying applications, configuring services, and enforcing desired state across fleets of machines using SSH-based agentless automation.

Prerequisites

  • Ansible 2.14+ installed (ansible --version)
  • SSH access to target hosts with key-based authentication
  • Python 3.9+ on control node and managed nodes
  • Inventory of target hosts (IPs or hostnames)
  • Privilege escalation credentials (sudo) if configuring system-level resources
  • ansible-lint installed for playbook validation

Instructions

  1. Scan the project for existing Ansible files (ansible.cfg, inventory/, roles/, group_vars/) to understand current structure
  2. Determine the automation target: server provisioning, application deployment, configuration management, or security hardening
  3. Create the playbook YAML with proper structure: hosts, become, vars, tasks, handlers
  4. Extract reusable logic into roles using the standard directory layout (tasks/, handlers/, templates/, defaults/, vars/, meta/)
  5. Define variables in group_vars/ and host_vars/ for environment-specific values, keeping secrets in vault-encrypted files
  6. Use Jinja2 templates for configuration files that vary across environments
  7. Add handlers for service restarts triggered by configuration changes
  8. Validate the playbook with ansible-lint and ansible-playbook --check --diff (dry run)
  9. Test idempotency by running the playbook twice and confirming no changes on the second run

Output

  • Ansible playbooks (.yml) with structured tasks, handlers, and variables
  • Role directories following Ansible Galaxy structure
  • Jinja2 templates (.j2) for dynamic configuration files
  • Inventory files (INI or YAML) with host groups
  • group_vars/ and host_vars/ for environment separation
  • ansible.cfg with connection and privilege escalation settings
Show full SKILL.md (181 more words)Show less

Error Handling

ErrorCauseSolution
unreachable: Failed to connect to hostSSH connection failure or wrong host/portVerify SSH keys, host IPs, and that port 22 is open with ansible -m ping
permission denied on becomeMissing or incorrect sudo passwordAdd --ask-become-pass or configure ansible_become_password in vault
undefined variableVariable not defined in vars, defaults, or inventoryCheck variable precedence; define in defaults/main.yml or group_vars/
ansible-lint: syntax-check failedYAML syntax error or deprecated module usageRun ansible-lint -v and fix reported issues; replace deprecated modules
changed on every run (not idempotent)Using command/shell without creates/removes guardsAdd creates: parameter or switch to purpose-built modules (copy, template, file)

Examples

  • "Create an Ansible playbook to provision an Ubuntu 22.04 server with Nginx, Certbot, and a firewall allowing only 80/443."
  • "Generate a role that deploys a Python Flask app with Gunicorn, systemd service file, and log rotation."
  • "Write an Ansible playbook to harden SSH config across all servers: disable root login, enforce key auth, set idle timeout."

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references, assets) in skills/.curated/creating-ansible-playbooks of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • assets/README.md
  • assets/playbook_template.yml
  • assets/validation_rules.yml
  • references/README.md
  • scripts/README.md
  • scripts/secure_playbook.py
  • scripts/test_playbook.sh
  • scripts/validate_playbook.py

Open the folder on GitHubat commit cfae287

Compare with similar skills

Creating Ansible Playbooks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Creating Ansible Playbooks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Creating Ansible Playbooks this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1kAutomated safety check: NotesMIT
Wdio Testingansible/vscode-ansible488—~2.2kAutomated safety check: PassMIT
Spa Create Configsplunk/splunk-platform-automator138—~3.5kAutomated safety check: PassProprietary
Spa Add Test Scenariosplunk/splunk-platform-automator138—~2.2kAutomated safety check: PassProprietary
Frontend Overlayansible/ansible-ui113—~2.5kAutomated safety check: NotesApache-2.0
Run Testsansible-collections/ansible.mysql134—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Wdio Testing

    ansible/vscode-ansible

    Write, run, and debug WebDriverIO (WDIO) UI tests for the Ansible VS Code extension.

    488 GitHub stars~2.2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Spa Create Config

    splunk/splunk-platform-automator

    A skill your agent uses when creating or updating splunkconfig.yml, designing Splunk Enterprise lab topology, multisite IDXC, SHC layout, architecture plan before config, or AWS Terraform block for…

    138 GitHub stars~3.5k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Spa Add Test Scenario

    splunk/splunk-platform-automator

    A skill your agent uses when adding app scope/routing test coverage (deployer, CM, DS, direct).

    138 GitHub stars~2.2k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Frontend Overlay

    ansible/ansible-ui

    Product-specific frontend wrappers, API clients, and paths for ansible-ui.

    113 GitHub stars~2.5k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Run Tests

    ansible-collections/ansible.mysql

    Runs and writes tests (sanity, unit, integration) for the ansible.mysql Ansible collection using ansible-test.

    134 GitHub stars~1.2k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Ansible Module Doc Review

    ansible-collections/vmware.vmware_rest

    Review and enrich Ansible module documentation to ensure completeness and quality.

    147 GitHub stars~3k tokensUpdated 8 days ago
    DevOps & CloudAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Creating Ansible Playbooks

What does Creating Ansible Playbooks do?

Execute use when you need to work with Ansible automation. An agent skill from jeremylongshore/tons-of-skills-marketplace. Creating Ansible Playbooks is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute use when you need to work with Ansible automation.

When should I use Creating Ansible Playbooks?

Creating Ansible Playbooks fits situations like: you need to work with Ansible automation; with phrases like create Ansible playbook; automate with Ansible; configure with Ansible.

How do I install Creating Ansible Playbooks in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill creating-ansible-playbooks -a claude-code`. Or copy the skill folder (skills/.curated/creating-ansible-playbooks in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/creating-ansible-playbooks in your project. Claude Code loads it when a task matches its description.

How do I install Creating Ansible Playbooks in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill creating-ansible-playbooks -a codex`. Or copy the skill folder (skills/.curated/creating-ansible-playbooks in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/creating-ansible-playbooks in your project. Codex loads it when a task matches its description.

Can I use Creating Ansible Playbooks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill creating-ansible-playbooks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/creating-ansible-playbooks, .gemini/skills/creating-ansible-playbooks, .github/skills/creating-ansible-playbooks and .opencode/skills/creating-ansible-playbooks in your project.

What does Creating Ansible Playbooks need to run?

Going by SKILL.md and its folder, Creating Ansible Playbooks needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (ansible and ansible-playbook). Our summary lists: Python 3; A Bash shell. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(ansible:*), Bash(terraform:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Creating Ansible Playbooks access the network?

SKILL.md names 3 domains. As links in the text: docs.ansible.com, galaxy.ansible.com and ansible.readthedocs.io. This is read from the text; nothing was executed.

Is Creating Ansible Playbooks safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Creating Ansible Playbooks use?

Creating Ansible Playbooks is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Creating Ansible Playbooks use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17 tokens, read only when the agent opens those files.

What are the alternatives to Creating Ansible Playbooks?

Skills that share tags, products or a category with Creating Ansible Playbooks: Wdio Testing (ansible/vscode-ansible, 488 stars), Spa Create Config (splunk/splunk-platform-automator, 138 stars), Spa Add Test Scenario (splunk/splunk-platform-automator, 138 stars) and Frontend Overlay (ansible/ansible-ui, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Creating Ansible Playbooks?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.