jpskill.com
🛠️ 開発・MCP コミュニティ

ansible-automation

Infrastructure automation and configuration management using Ansible playbooks, roles, and inventory. Use for deploying applications, patching, and managing servers.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ansible-automation.zip https://jpskill.com/download/21322.zip && unzip -o ansible-automation.zip && rm ansible-automation.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21322.zip -OutFile "$d\ansible-automation.zip"; Expand-Archive "$d\ansible-automation.zip" -DestinationPath $d -Force; ri "$d\ansible-automation.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ansible-automation.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ansible-automation フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
6

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Ansible Automation

目次

概要

Ansible Playbook、ロール、および動的インベントリ管理を使用して、複数のサーバーにわたるインフラストラクチャのプロビジョニング、構成管理、およびアプリケーションのデプロイを自動化します。

使用場面

  • 構成管理
  • アプリケーションのデプロイ
  • インフラストラクチャのパッチ適用と更新
  • マルチサーバーオーケストレーション
  • クラウドインスタンスのプロビジョニング
  • コンテナ管理
  • データベース管理
  • セキュリティコンプライアンスの自動化

クイックスタート

最小限の動作例:

# site.yml - Main playbook
---
- name: Deploy application stack
  hosts: all
  gather_facts: yes
  serial: 1  # Rolling deployment

  pre_tasks:
    - name: Display host information
      debug:
        var: inventory_hostname
      tags: [always]

  roles:
    - common
    - docker
    - application

  post_tasks:
    - name: Verify deployment
      uri:
        url: "http://{{ inventory_hostname }}:8080/health"
        status_code: 200
      retries: 3
      delay: 10
// ... (see reference guides for full implementation)

リファレンスガイド

references/ ディレクトリ内の詳細な実装:

ガイド 内容
Playbook Structure and Best Practices Playbookの構造とベストプラクティス
Inventory and Variables インベントリと変数
Ansible Deployment Script Ansibleデプロイスクリプト
Configuration Template 構成テンプレート

ベストプラクティス

✅ 実施すべきこと

  • モジュール性のためロールを使用する
  • 適切なエラー処理を実装する
  • 構成にはテンプレートを使用する
  • 冪等性のためハンドラを活用する
  • ローリングアップデートのためシリアルデプロイメントを使用する
  • ヘルスチェックを実装する
  • インベントリをバージョン管理に保存する
  • 機密データにはvaultを使用する

❌ 実施すべきでないこと

  • 条件なしでcommand/shellを使用する
  • テンプレートなしでファイルをコピーする
  • 最初にチェックモードなしで実行する
  • インベントリで環境を混在させる
  • 値をハードコードする
  • エラー処理を無視する
  • 単純なタスクにshellを使用する
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Ansible Automation

Table of Contents

Overview

Automate infrastructure provisioning, configuration management, and application deployment across multiple servers using Ansible playbooks, roles, and dynamic inventory management.

When to Use

  • Configuration management
  • Application deployment
  • Infrastructure patching and updates
  • Multi-server orchestration
  • Cloud instance provisioning
  • Container management
  • Database administration
  • Security compliance automation

Quick Start

Minimal working example:

# site.yml - Main playbook
---
- name: Deploy application stack
  hosts: all
  gather_facts: yes
  serial: 1  # Rolling deployment

  pre_tasks:
    - name: Display host information
      debug:
        var: inventory_hostname
      tags: [always]

  roles:
    - common
    - docker
    - application

  post_tasks:
    - name: Verify deployment
      uri:
        url: "http://{{ inventory_hostname }}:8080/health"
        status_code: 200
      retries: 3
      delay: 10
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Playbook Structure and Best Practices Playbook Structure and Best Practices
Inventory and Variables Inventory and Variables
Ansible Deployment Script Ansible Deployment Script
Configuration Template Configuration Template

Best Practices

✅ DO

  • Use roles for modularity
  • Implement proper error handling
  • Use templates for configuration
  • Leverage handlers for idempotency
  • Use serial deployment for rolling updates
  • Implement health checks
  • Store inventory in version control
  • Use vault for sensitive data

❌ DON'T

  • Use command/shell without conditionals
  • Copy files without templates
  • Run without check mode first
  • Mix environments in inventory
  • Hardcode values
  • Ignore error handling
  • Use shell for simple tasks

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。