← スキル一覧に戻る

ansible
by jpoutrin
Claude Code Marketplace Plugin to dev like a pro in a multi-agent fashion
⭐ 4🍴 0📅 2026年1月22日
SKILL.md
name: ansible description: Ansible automation and configuration management patterns. Use when writing Ansible playbooks, roles, or automating infrastructure configuration and deployment tasks.
Ansible Skill
This skill provides Ansible automation patterns and best practices.
Playbook Structure
---
- name: Configure web servers
hosts: webservers
become: true
vars:
http_port: 80
tasks:
- name: Install nginx
ansible.builtin.apt:
name: nginx
state: present
notify: Restart nginx
handlers:
- name: Restart nginx
ansible.builtin.service:
name: nginx
state: restarted
Role Structure
roles/
└── webserver/
├── defaults/main.yml # Default variables
├── handlers/main.yml # Handler definitions
├── tasks/main.yml # Task list
├── templates/ # Jinja2 templates
├── files/ # Static files
└── vars/main.yml # Role variables
Best Practices
Use Fully Qualified Collection Names
# ✅ Good
- ansible.builtin.apt:
name: nginx
# ❌ Bad (ambiguous)
- apt:
name: nginx
Idempotent Tasks
# Tasks should be safe to run multiple times
- name: Ensure config exists
ansible.builtin.template:
src: config.j2
dest: /etc/app/config.yml
# Only changes if content differs
Use Handlers for Service Restarts
tasks:
- name: Update config
template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
notify: Restart nginx
handlers:
- name: Restart nginx
service:
name: nginx
state: restarted
Inventory Best Practices
[webservers]
web1.example.com
web2.example.com
[dbservers]
db1.example.com
[production:children]
webservers
dbservers
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です