Ansible automation

From aj-geddes/useful-ai-prompts · View interactive version

Ansible automation is an AI agent skill from the GitHub repository aj-geddes/useful-ai-prompts. Infrastructure automation and configuration management using Ansible playbooks, roles, and inventory. Use for deploying applications, patching, and managing servers.

How to use this skill

Skill file

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

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

❌ DON'T

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.