Agent skill
ansible
Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible.
Install this agent skill to your Project
npx add-skill https://github.com/partme-ai/full-stack-skills/tree/main/skills/devops-skills/ansible
SKILL.md
When to use this skill
Use this skill whenever the user wants to:
- Write Ansible playbooks, roles, or inventory files
- Execute ad-hoc commands or run playbooks against hosts
- Use modules (package, copy, template, service, user, etc.) for configuration and deployment
- Handle variables, conditionals, loops, and error handling in Ansible
- Set up Ansible Vault for secrets management
How to use this skill
Workflow
- Define inventory — list target hosts in INI or YAML format
- Write playbook — define hosts, tasks, handlers, and vars in YAML
- Organize with roles — extract reusable tasks, templates, and defaults into roles
- Run and validate — execute with
ansible-playbookand verify idempotency
Quick Start Example
# site.yml
---
- name: Deploy web application
hosts: webservers
become: true
vars:
app_port: 8080
tasks:
- name: Install nginx
ansible.builtin.package:
name: nginx
state: present
- name: Deploy config from template
ansible.builtin.template:
src: templates/nginx.conf.j2
dest: /etc/nginx/nginx.conf
notify: restart nginx
handlers:
- name: restart nginx
ansible.builtin.service:
name: nginx
state: restarted
# Run the playbook
ansible-playbook -i inventory/production site.yml
# Ad-hoc ping all hosts
ansible -m ping all
Key Commands
| Command | Purpose |
|---|---|
ansible-playbook playbook.yml |
Run a playbook |
ansible -m ping all |
Test connectivity |
ansible-vault encrypt vars/secrets.yml |
Encrypt sensitive data |
ansible-galaxy init myrole |
Scaffold a new role |
Best Practices
- Organize with roles and
group_vars/host_varshierarchy; avoid monolithic playbooks - Encrypt sensitive data with
ansible-vault; use idempotent tasks withstateand conditionals - Define explicit failure handling (
ignore_errors,block/rescue); use tags for selective runs - Control node requires Python; target hosts need SSH access; optionally use AWX/Tower for scheduling
Troubleshooting
- Connection refused: Verify SSH keys and
ansible_userin inventory - Module not found: Check Ansible version and use FQCN (e.g.,
ansible.builtin.copy) - Idempotency failures: Ensure tasks use
stateparameter and avoid shell commands where modules exist
Keywords
ansible, playbook, role, inventory, automation, configuration management, ansible-vault, infrastructure
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ocrmypdf-batch
OCRmyPDF batch processing skill — process multiple PDFs, Docker automation, shell scripting, and CI/CD integration. Use when the user needs to OCR many PDFs, set up automated OCR pipelines, or integrate OCR into workflows.
ocrmypdf-optimize
OCRmyPDF optimization skill — compress PDFs, configure PDF/A output, JBIG2 encoding, and lossless optimization. Use when the user needs to reduce PDF file size, create archival PDF/A files, or optimize OCR output.
ocrmypdf-image
OCRmyPDF image processing skill — deskew, rotate, clean, despeckle, remove border from scanned documents. Use when the user needs to improve scanned PDF quality, fix skewed pages, remove noise, or clean up scanned documents before OCR.
ocrmypdf-api
OCRmyPDF Python API and plugin skill — use OCRmyPDF programmatically from Python, integrate with applications, and extend with plugins (EasyOCR, PaddleOCR, AppleOCR). Use when the user needs to call OCRmyPDF from Python code, build OCR pipelines, or use alternative OCR engines.
ocrmypdf
OCRmyPDF core skill — add searchable OCR text layer to scanned PDFs, convert images to searchable PDFs, support 100+ languages via Tesseract. Use when the user needs to OCR a PDF, make a scanned PDF searchable, or extract text from scanned documents.
svelte
Guides Svelte and SvelteKit development including reactive components, stores, transitions, lifecycle hooks, SSR, file-based routing, and deployment. Use when the user needs to build Svelte components, create SvelteKit applications, implement reactivity patterns, or configure Svelte with Vite.
Didn't find tool you were looking for?