g1joshi/agent-skills/ansible
Claude Code and agent skill by g1joshi/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Expert Ansible automation assistance covering playbooks, roles, inventory, idempotent modules, and Ansible Vault. Use when automating server configuration, application deployment, and infrastructure orchestration.
Install
npx vskill@latest install g1joshi/agent-skills/ansibleSKILL.md
The same SKILL.md was published earlier as g1joshi/agent-skills/ansible.
Ansible
Ansible is an agentless automation engine for configuration management, infrastructure provisioning, and multi-tier application deployment via declarative YAML playbooks.
When to Use
- Agentless Infrastructure Configuration: Automating multi-node server setup over SSH without installing client daemons.
- Application Deployment & Provisioning: Deploying microservices, security patches, and system packages idempotently.
- Security Hardening & Compliance: Enforcing CIS benchmarks, firewall rules, and SSH hardening across fleet servers.
- Orchestration & Rolling Updates: Coordinating zero-downtime rolling upgrades across clustered backend nodes.
Quick Start
Core Concepts
Idempotent Playbook Structure with Handlers
Configuring web servers with automated restart triggers:
Dynamic Inventory & Host Grouping
Targeting cloud infrastructure dynamically:
Ansible Vault for Secret Protection
Encrypting credentials and sensitive environment variables:
Common Patterns
Idempotent Nginx Configuration and Service Handler
Problem: Applying configuration changes repeatedly without restarting services unless template files changed.
Solution: Use notification handlers triggered by templated tasks:
Best Practices
Do:
- Always use fully qualified collection names (FQCN), e.g.
ansible.builtin.template,community.docker.docker_container. - Verify idempotency by running playbooks twice in CI; the second run must report
changed=0. - Store credentials, certificates, and passwords in
ansible-vaultor retrieve from HashiCorp Vault. - Test roles and playbooks using Molecule and testinfra in automated CI pipelines.
Don't:
- Use
ansible.builtin.shellorcommandwhen a dedicated idempotent Ansible module exists. - Commit unencrypted vault passwords or plain text secrets to version control.
- Perform large inventory operations without
--forkstuned for network concurrency.
Troubleshooting
| Error | Cause | Solution | |
|---|---|---|---|
Permission denied (publickey) | SSH key missing, incorrect user, or host key verification failed. | Specify private key via --private-key or set ansible_user in inventory. | |
FAILED! => {"changed": false, "msg": "Destination ... is not writable"} | Task requires root escalation but become: true is missing. | Add become: true at playbook or task level. | |
Syntax Error while loading YAML | Tab characters or improper indentation in YAML playbook. | Ensure consistent 2-space indentation and run ansible-lint playbook.yml. |
References
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/devops/ansible/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/g1joshi/agent-skills/ansible)